diff options
author | Eli Bendersky <eliben@gmail.com> | 2011-02-07 04:44:19 (GMT) |
---|---|---|
committer | Eli Bendersky <eliben@gmail.com> | 2011-02-07 04:44:19 (GMT) |
commit | 7ac3419a6c6fce7ac935e7afbdbc8621ea0b756b (patch) | |
tree | a32f19406a300afde5df8f168bc90f049b9ba29f /Doc/howto | |
parent | 2d062de1d821adc36d92a34e5d806d21da0e87e1 (diff) | |
download | cpython-7ac3419a6c6fce7ac935e7afbdbc8621ea0b756b.zip cpython-7ac3419a6c6fce7ac935e7afbdbc8621ea0b756b.tar.gz cpython-7ac3419a6c6fce7ac935e7afbdbc8621ea0b756b.tar.bz2 |
Fix some typos and grammar
Diffstat (limited to 'Doc/howto')
-rw-r--r-- | Doc/howto/pyporting.rst | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Doc/howto/pyporting.rst b/Doc/howto/pyporting.rst index 4b95980..33ea92f 100644 --- a/Doc/howto/pyporting.rst +++ b/Doc/howto/pyporting.rst @@ -149,14 +149,14 @@ that 3to2 is not a high-quality project. Python 2 and 2to3 ================= -Included with Python since 2.6, 2to3_ tool (and :mod:`lib2to3` module) helps -with porting Python 2 to Python 3 by performing various source translations. -This is a perfect solution for projects which wish to branch their Python 3 -code from their Python 2 codebase and maintain them as independent codebases. -You can even begin preparing to use this approach today by writing -future-compatible Python code which works cleanly in Python 2 in conjunction -with 2to3; all steps outlined below will work with Python 2 code up to the -point when the actual use of 2to3 occurs. +Included with Python since 2.6, the 2to3_ tool (and :mod:`lib2to3` module) +helps with porting Python 2 to Python 3 by performing various source +translations. This is a perfect solution for projects which wish to branch +their Python 3 code from their Python 2 codebase and maintain them as +independent codebases. You can even begin preparing to use this approach +today by writing future-compatible Python code which works cleanly in +Python 2 in conjunction with 2to3; all steps outlined below will work +with Python 2 code up to the point when the actual use of 2to3 occurs. Use of 2to3 as an on-demand translation step at install time is also possible, preventing the need to maintain a separate Python 3 codebase, but this approach @@ -468,11 +468,11 @@ In Python 2, the following worked:: >>> exc[1] # Python 2 only! 2 -But in Python 3, indexing directly off of an exception is an error. You need to -make sure to only index on :attr:`BaseException.args` attribute which is a +But in Python 3, indexing directly on an exception is an error. You need to +make sure to only index on the :attr:`BaseException.args` attribute which is a sequence containing all arguments passed to the :meth:`__init__` method. -Even better is to use documented attributes the exception provides. +Even better is to use the documented attributes the exception provides. Don't use ``__getslice__`` & Friends '''''''''''''''''''''''''''''''''''' |