Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 44e0dba

Browse filesBrowse files
author
Kenneth Reitz
committed
Merge pull request realpython#287 from untitaker/python2vs3
Rewrite section on choosing a Python version
2 parents fc5ea93 + 7e7e3d0 commit 44e0dba
Copy full SHA for 44e0dba

File tree

1 file changed

+17
-22
lines changed
Filter options

1 file changed

+17
-22
lines changed

‎docs/starting/which-python.rst

Copy file name to clipboardExpand all lines: docs/starting/which-python.rst
+17-22Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,32 @@ Picking an Interpreter
33

44
.. _which-python:
55

6-
Which Python to use?
7-
8-
9-
2.x vs 3.x
10-
~~~~~~~~~~
11-
12-
Python 2.x is the status quo, Python 3.x is the shiny new thing.
13-
14-
15-
`Further Reading <http://wiki.python.org/moin/Python2orPython3>`_
16-
17-
18-
Today
19-
-----
6+
Today (Python 2)
7+
~~~~~~~~~~~~~~~~
208

219
If you're choosing a Python interpreter to use, I *highly* recommend you use
2210
Python 2.7.x, unless you have a strong reason not to.
2311

12+
Also use Python 2.7.x if you're starting to work on a new Python module. If you
13+
have managed to get it working on 2.7, you can add support for older 2.x
14+
versions.
2415

25-
The Future
26-
----------
16+
The Future (Python 3)
17+
~~~~~~~~~~~~~~~~~~~~~
2718

28-
As more and more modules get ported over to Python3, the easier it will be for
29-
others to use it.
19+
Python 2.x is the status quo, Python 3.x is the shiny new thing.
3020

21+
`Further Reading <http://wiki.python.org/moin/Python2orPython3>`_
3122

32-
Which Python to Support?
33-
~~~~~~~~~~~~~~~~~~~~~~~~
23+
Python 3, on the other hand, differs much more greatly from Python 2, so
24+
writing code that works both on Python 2 and Python 3 is a very complicated
25+
process.
3426

35-
If you're starting work on a new Python module, I recommend you write it for
36-
Python 2.5 or 2.6, and add support for Python3 in a later iteration.
27+
It is still possible to `write code that works on Python 2.6, 2.7 and 3.3
28+
<http://lucumr.pocoo.org/2013/5/21/porting-to-python-3-redux/>`_. Depending on
29+
the kind of software you are writing, this might be either tricky or extremely
30+
hard, and if you're a beginner there are much more important things to worry
31+
about.
3732

3833
Implementations
3934
~~~~~~~~~~~~~~~

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.