briancurtin  committed 44c8ed2

Fix the number of new-lines in certain areas to be common throughout.

  • Participants
  • Parent commits 8123079

Comments (0)

Files changed (1)

File manuals/python3_porting/py-porting.rst

 .. warning:: This document is under construction.
 the standard and reorganize some of the common functionality which existed
 Name Changes
     except ImportError:
         import Queue as queue
 .. _reorganization:
 The following charts lay out the locations of the 2.x objects and their new
 | :exc:`urllib.ContentTooShortError`  | :exc:`urllib.error.ContentTooShortError`                                              |
 Executing Arbitrary Code
 ``exec`` Statement
 objects are only available via the :keyword:`as` keyword, which was
 introduced in 2.6.
 .. _raising-exceptions:
 Raising Exceptions
 Due to the fact that the :keyword:`as` keyword isn't found Python 2.5 and
 before, code which must run on versions with and without :keyword:`as` support
 can use the following idiom.
     import sys
 :func:`next` function is called with the iterable object as it's sole
 parameter, which calls the underlying :meth:`__next__` method.
 .. _iterating:
 | StopIteration                          | StopIteration                          |
 .. admonition:: Backporting Note
    The :func:`next` function was backported to Python 2.6 which allows you to
 and :meth:`dict.values` to replace the old-style form which returned a
 .. admonition:: Backporting Note
    Since the view concept has no equivalent in 2.x, the backporting of views
 support 2 and 3 separately. That method may require more work for a developer,
 but it's straightforward to do and doesn't require any discussion here.
 Single Codebase
 Some users have been able to support ranges as wide as Python 2.0 through 3.0
 all from one source.
 See the documentation for :mod:`2to3` for all available options.
 As with the :mod:`2to3` method, a good test suite is instrumental in
 succesfully using a 3.x base and ``3to2`` for conversion.