Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated python 2 vs 3 (fixes #48) #488

Merged
merged 2 commits into from
Oct 12, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 10 additions & 15 deletions docs/starting/which-python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,25 @@ Picking an Interpreter

.. _which-python:

Today (Python 2)
Today (Python 3)
~~~~~~~~~~~~~~~~

If you're choosing a Python interpreter to use, I *highly* recommend you use
Python 2.7.x, unless you have a strong reason not to.
If you're choosing a Python interpreter to use, I recommend you use the
newest Python 3.x, since every version brings new and improved standard
library modules, security and bug fixes.

Also use Python 2.7.x if you're starting to work on a new Python module. If you
have managed to get it working on 2.7, you can add support for older 2.x
versions.
Only use Python 3 if you have a strong reason to, such as a Python 2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're telling people to use Python 3 when there's no Python 3 ready version of a library for it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops, fixing!

exclusive library which has no adequate, Python 3 ready alternative. Use
`Can I Use Python 3? <https://caniusepython3.com/>` to check if this is
the case.

The Future (Python 3)
~~~~~~~~~~~~~~~~~~~~~

Python 2.x is the status quo, Python 3.x is the shiny new thing.
Python 2.x is legacy, Python 3.x is the present and future of the language
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python 2.7 is being supported for a very long time. It's still the present. There is still active development to improve it's security for a forward looking maintenance schedule.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. this is the quote on the linked page. i think the quote it replaces is an old citation of that page.
  2. legacy means “of, relating to, or being a previous or outdated computer system”, which is an apt description of a still-maintained, yet feature-frozen version of a program.

the present for me is something that is under active development, not maintenance mode. or something that is in maintenance mode and has nothing carrying its torch. (e.g. something that is considered feature-complete, like thunderbird.) python 2 has python 3 as torch-carrier, which has the features of the older versions and more, and is actively developed while being mature and stable. it is the present and the future. python 2 is the past and legacy.


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

The difference between Python 3 and Python 2 is much greater, therefore
writing code that works in both Python 2 and Python 3 is a very complicated
process.

It is possible to `write code that works on Python 2.6, 2.7 and 3.3
<http://lucumr.pocoo.org/2013/5/21/porting-to-python-3-redux/>`_. This
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still true

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this paragraph is redundant, as the following one pretty much says the same.

also usually “writing code that works in both Python 2 and Python 3 is not a very complicated process.” it’s actually pretty trivial for most small libraries or programs. just import everything from __future__ and create some wrappers around APIs that use bytes on python 2 and strs on python 3, and you’re set. i think the following paragraph serves to explain that.

ranges from tricky to extremely hard depending upon the kind of software
ranges from trivial to hard depending upon the kind of software
you are writing; if you're a beginner there are far more important things to
worry about.

Expand Down