Skip to content
Open
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
14 changes: 14 additions & 0 deletions python3_user_transition_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ Python 3 transition guide
Switching to Python 3 can seem like a daunting task, but this guide will
provide some tips and resources to help make it more straightforward.

Changes for vanilla Python to support both Python 2 and 3
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is a little unclear. Maybe "vanilla python code" or just "python code".

---------------------------------------------------------
Vanilla Python code (i.e., typical scientific code)
does not need much modification to run under *both* Python 2 and Python 3.

For these scripts, including the line below at the top
of the script makes the script run under both Python 2 and Python 3.

.. code-block:: python

from __future__ import print_function, division, absolute_import

The next section provides an explanation of what this provides.

Changes you can make today to make the transition easier
--------------------------------------------------------

Expand Down