summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-02-26 03:38:59 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-02-26 03:38:59 (GMT)
commitad3d5c2235743f23db54fb5ef2c337a0e21c9548 (patch)
tree9814660def28b76dc923a39d292588cb2fd9b9fb /Doc/library
parent40ce6cc06688e8527180eeee342005e5912d4eb2 (diff)
downloadcpython-ad3d5c2235743f23db54fb5ef2c337a0e21c9548.zip
cpython-ad3d5c2235743f23db54fb5ef2c337a0e21c9548.tar.gz
cpython-ad3d5c2235743f23db54fb5ef2c337a0e21c9548.tar.bz2
Merged revisions 69803-69805,69840,69901,69905,69907,69924,69927,69987 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r69803 | georg.brandl | 2009-02-20 01:48:21 -0600 (Fri, 20 Feb 2009) | 1 line #5327: fix a broken link by joining it. ........ r69804 | georg.brandl | 2009-02-20 02:22:21 -0600 (Fri, 20 Feb 2009) | 1 line At least separate imports from other statements. ........ r69805 | georg.brandl | 2009-02-20 02:45:47 -0600 (Fri, 20 Feb 2009) | 2 lines Fix punctuation. ........ r69840 | georg.brandl | 2009-02-21 13:09:40 -0600 (Sat, 21 Feb 2009) | 1 line #5338, #5339: two types in the API manual. ........ r69901 | georg.brandl | 2009-02-23 05:24:46 -0600 (Mon, 23 Feb 2009) | 2 lines #5349: C++ pure virtuals can also have an implementation. ........ r69905 | georg.brandl | 2009-02-23 09:51:27 -0600 (Mon, 23 Feb 2009) | 2 lines #5352: str.count() counts non-overlapping instances. ........ r69907 | georg.brandl | 2009-02-23 12:33:48 -0600 (Mon, 23 Feb 2009) | 1 line Fix grammar. ........ r69924 | benjamin.peterson | 2009-02-23 20:45:35 -0600 (Mon, 23 Feb 2009) | 1 line update README on running tests ........ r69927 | neil.schemenauer | 2009-02-23 22:23:25 -0600 (Mon, 23 Feb 2009) | 1 line Fix call to os.waitpid, it does not take keyword args. ........ r69987 | benjamin.peterson | 2009-02-25 18:30:11 -0600 (Wed, 25 Feb 2009) | 1 line fix str.format()'s first arg #5371 ........
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/2to3.rst6
-rw-r--r--Doc/library/abc.rst2
-rw-r--r--Doc/library/cgi.rst15
-rw-r--r--Doc/library/cgitb.rst5
-rw-r--r--Doc/library/stdtypes.rst8
-rw-r--r--Doc/library/xml.etree.elementtree.rst2
6 files changed, 21 insertions, 17 deletions
diff --git a/Doc/library/2to3.rst b/Doc/library/2to3.rst
index 7ab34da..03cfbbe 100644
--- a/Doc/library/2to3.rst
+++ b/Doc/library/2to3.rst
@@ -38,9 +38,9 @@ It can be converted to Python 3.x code via 2to3 on the command line::
$ 2to3 example.py
A diff against the original source file is printed. 2to3 can also write the
-needed modifications right back to the source file. (Of course, a backup of the
-original is also be made unless :option:`-n` is also given.) Writing the
-changes back is enabled with the :option:`-w` flag::
+needed modifications right back to the source file. (A backup of the original
+file is made unless :option:`-n` is also given.) Writing the changes back is
+enabled with the :option:`-w` flag::
$ 2to3 -w example.py
diff --git a/Doc/library/abc.rst b/Doc/library/abc.rst
index 8ab90cc..42f508d 100644
--- a/Doc/library/abc.rst
+++ b/Doc/library/abc.rst
@@ -150,7 +150,7 @@ It also provides the following decorators:
.. note::
- Unlike C++'s pure virtual functions, or Java abstract methods, these abstract
+ Unlike Java abstract methods, these abstract
methods may have an implementation. This implementation can be
called via the :func:`super` mechanism from the class that
overrides it. This could be useful as an end-point for a
diff --git a/Doc/library/cgi.rst b/Doc/library/cgi.rst
index c8d9903..e9b2c77 100644
--- a/Doc/library/cgi.rst
+++ b/Doc/library/cgi.rst
@@ -65,16 +65,18 @@ Using the cgi module
Begin by writing ``import cgi``.
-When you write a new script, consider adding the line::
+When you write a new script, consider adding these lines::
- import cgitb; cgitb.enable()
+ import cgitb
+ cgitb.enable()
This activates a special exception handler that will display detailed reports in
the Web browser if any errors occur. If you'd rather not show the guts of your
program to users of your script, you can have the reports saved to files
-instead, with a line like this::
+instead, with code like this::
- import cgitb; cgitb.enable(display=0, logdir="/tmp")
+ import cgitb
+ cgitb.enable(display=0, logdir="/tmp")
It's very helpful to use this feature during script development. The reports
produced by :mod:`cgitb` provide information that can save you a lot of time in
@@ -445,9 +447,10 @@ discarded altogether.
Fortunately, once you have managed to get your script to execute *some* code,
you can easily send tracebacks to the Web browser using the :mod:`cgitb` module.
-If you haven't done so already, just add the line::
+If you haven't done so already, just add the lines::
- import cgitb; cgitb.enable()
+ import cgitb
+ cgitb.enable()
to the top of your script. Then try running it again; when a problem occurs,
you should see a detailed report that will likely make apparent the cause of the
diff --git a/Doc/library/cgitb.rst b/Doc/library/cgitb.rst
index c106d9e..854ea95 100644
--- a/Doc/library/cgitb.rst
+++ b/Doc/library/cgitb.rst
@@ -24,9 +24,10 @@ as well as the values of the arguments and local variables to currently running
functions, to help you debug the problem. Optionally, you can save this
information to a file instead of sending it to the browser.
-To enable this feature, simply add one line to the top of your CGI script::
+To enable this feature, simply add this to the top of your CGI script::
- import cgitb; cgitb.enable()
+ import cgitb
+ cgitb.enable()
The options to the :func:`enable` function control whether the report is
displayed in the browser and whether the report is logged to a file for later
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 3e5f2ac..eea7364 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -793,9 +793,9 @@ functions based on regular expressions.
.. method:: str.count(sub[, start[, end]])
- Return the number of occurrences of substring *sub* in the range [*start*,
- *end*]. Optional arguments *start* and *end* are interpreted as in slice
- notation.
+ Return the number of non-overlapping occurrences of substring *sub* in the
+ range [*start*, *end*]. Optional arguments *start* and *end* are
+ interpreted as in slice notation.
.. method:: str.encode([encoding[, errors]])
@@ -835,7 +835,7 @@ functions based on regular expressions.
found.
-.. method:: str.format(format_string, *args, **kwargs)
+.. method:: str.format(*args, **kwargs)
Perform a string formatting operation. The *format_string* argument can
contain literal text or replacement fields delimited by braces ``{}``. Each
diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst
index 623df5a..a04b04a 100644
--- a/Doc/library/xml.etree.elementtree.rst
+++ b/Doc/library/xml.etree.elementtree.rst
@@ -529,5 +529,5 @@ This is an example of counting the maximum depth of an XML file::
.. [#] The encoding string included in XML output should conform to the
appropriate standards. For example, "UTF-8" is valid, but "UTF8" is
not. See http://www.w3.org/TR/2006/REC-xml11-20060816/#NT-EncodingDecl
- and http://www.iana.org/assignments/character-sets .
+ and http://www.iana.org/assignments/character-sets.