Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7ac3419

Browse files
committed
Fix some typos and grammar
1 parent 2d062de commit 7ac3419

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

Doc/howto/pyporting.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,14 @@ that 3to2 is not a high-quality project.
149149

150150
Python 2 and 2to3
151151
=================
152-
Included with Python since 2.6, 2to3_ tool (and :mod:`lib2to3` module) helps
153-
with porting Python 2 to Python 3 by performing various source translations.
154-
This is a perfect solution for projects which wish to branch their Python 3
155-
code from their Python 2 codebase and maintain them as independent codebases.
156-
You can even begin preparing to use this approach today by writing
157-
future-compatible Python code which works cleanly in Python 2 in conjunction
158-
with 2to3; all steps outlined below will work with Python 2 code up to the
159-
point when the actual use of 2to3 occurs.
152+
Included with Python since 2.6, the 2to3_ tool (and :mod:`lib2to3` module)
153+
helps with porting Python 2 to Python 3 by performing various source
154+
translations. This is a perfect solution for projects which wish to branch
155+
their Python 3 code from their Python 2 codebase and maintain them as
156+
independent codebases. You can even begin preparing to use this approach
157+
today by writing future-compatible Python code which works cleanly in
158+
Python 2 in conjunction with 2to3; all steps outlined below will work
159+
with Python 2 code up to the point when the actual use of 2to3 occurs.
160160

161161
Use of 2to3 as an on-demand translation step at install time is also possible,
162162
preventing the need to maintain a separate Python 3 codebase, but this approach
@@ -468,11 +468,11 @@ In Python 2, the following worked::
468468
>>> exc[1] # Python 2 only!
469469
2
470470

471-
But in Python 3, indexing directly off of an exception is an error. You need to
472-
make sure to only index on :attr:`BaseException.args` attribute which is a
471+
But in Python 3, indexing directly on an exception is an error. You need to
472+
make sure to only index on the :attr:`BaseException.args` attribute which is a
473473
sequence containing all arguments passed to the :meth:`__init__` method.
474474

475-
Even better is to use documented attributes the exception provides.
475+
Even better is to use the documented attributes the exception provides.
476476

477477
Don't use ``__getslice__`` & Friends
478478
''''''''''''''''''''''''''''''''''''

0 commit comments

Comments
 (0)