Skip to content

Commit 35d02da

Browse files
authored
Merge pull request #511 from jarrodmillman/python2
Remove Python 2 material
2 parents c8f407e + ee67d88 commit 35d02da

File tree

5 files changed

+0
-200
lines changed

5 files changed

+0
-200
lines changed

intro/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ itself, to numerical computing or plotting.
1818

1919
intro.rst
2020
language/python_language.rst
21-
python_2_python_3.rst
2221
numpy/index.rst
2322
matplotlib/index.rst
2423
scipy.rst

intro/intro.rst

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -248,15 +248,6 @@ Python comes in many flavors, and there are many ways to install it.
248248
However, we recommend to install a scientific-computing distribution,
249249
that comes readily with optimized versions of scientific modules.
250250

251-
.. warning:: **You should install Python 3**
252-
253-
Python 2.7 is end of life, and will not be maintained past January 1, 2020.
254-
255-
**Working with Python 2.7 is at your own risk. Do not expect much support.**
256-
257-
* `Official announcement <https://www.python.org/dev/peps/pep-0373/>`_
258-
* `The end is nigh <https://pythonclock.org/>`_
259-
260251
**Under Linux**
261252

262253
If you have a recent distribution, most of the tools are probably

intro/language/basic_types.rst

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -62,47 +62,6 @@ Type conversion (casting)::
6262
>>> float(1)
6363
1.0
6464

65-
.. warning:: Integer division
66-
67-
In Python 2::
68-
69-
>>> 3 / 2 # doctest: +SKIP
70-
1
71-
72-
In Python 3::
73-
74-
>>> 3 / 2 # doctest: +SKIP
75-
1.5
76-
77-
**To be safe**: use floats::
78-
79-
>>> 3 / 2.
80-
1.5
81-
82-
>>> a = 3
83-
>>> b = 2
84-
>>> a / b # In Python 2 # doctest: +SKIP
85-
1
86-
>>> a / float(b)
87-
1.5
88-
89-
**Future behavior**: to always get the behavior of Python3
90-
91-
>>> from __future__ import division # doctest: +SKIP
92-
>>> 3 / 2 # doctest: +SKIP
93-
1.5
94-
95-
.. tip::
96-
97-
If you explicitly want integer division use ``//``::
98-
99-
>>> 3.0 // 2
100-
1.0
101-
102-
.. note::
103-
104-
The behaviour of the division operator has changed in `Python 3
105-
<http://python3porting.com/preparing.html#use-instead-of-when-dividing-integers>`_.
10665

10766
Containers
10867
------------

intro/numpy/elaborate_arrays.rst

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,6 @@ Unsigned integers:
8484
>>> np.iinfo(np.uint32).max, 2**32 - 1
8585
(4294967295, 4294967295)
8686

87-
.. sidebar:: Long integers
88-
89-
Python 2 has a specific type for 'long' integers, that cannot
90-
overflow, represented with an 'L' at the end. In Python 3, all
91-
integers are long, and thus cannot overflow.
92-
93-
>>> np.iinfo(np.int64).max, 2**63 - 1 # doctest: +SKIP
94-
(9223372036854775807, 9223372036854775807L)
95-
9687

9788
Floating-point numbers:
9889

intro/python_2_python_3.rst

Lines changed: 0 additions & 140 deletions
This file was deleted.

0 commit comments

Comments
 (0)