Skip to content

Commit 6072807

Browse files
author
benjamin.peterson
committed
Merged revisions 69803-69805,69840,69901,69905,69907,69924,69927,69987 via svnmerge from
svn+ssh://[email protected]/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 ........ git-svn-id: http://svn.python.org/projects/python/branches/py3k@69990 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 2b156b1 commit 6072807

12 files changed

Lines changed: 55 additions & 23 deletions

File tree

Doc/c-api/intro.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ caller is said to receive a *new* reference. When no ownership is transferred,
187187
the caller is said to *borrow* the reference. Nothing needs to be done for a
188188
borrowed reference.
189189

190-
Conversely, when a calling function passes it a reference to an object, there
190+
Conversely, when a calling function passes in a reference to an object, there
191191
are two possibilities: the function *steals* a reference to the object, or it
192192
does not. *Stealing a reference* means that when you pass a reference to a
193193
function, that function assumes that it now owns that reference, and you are not

Doc/c-api/veryhigh.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ parameter. The available start symbols are :const:`Py_eval_input`,
1616
:const:`Py_file_input`, and :const:`Py_single_input`. These are described
1717
following the functions which accept them as parameters.
1818

19-
Note also that several of these functions take :ctype:`FILE\*` parameters. On
19+
Note also that several of these functions take :ctype:`FILE\*` parameters. One
2020
particular issue which needs to be handled carefully is that the :ctype:`FILE`
2121
structure for different C libraries can be different and incompatible. Under
2222
Windows (at least), it is possible for dynamically linked extensions to actually

Doc/howto/webservers.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ simple CGI program::
9999
# -*- coding: UTF-8 -*-
100100

101101
# enable debugging
102-
import cgitb; cgitb.enable()
102+
import cgitb
103+
cgitb.enable()
103104

104105
print("Content-Type: text/plain;charset=utf-8")
105106
print()

Doc/library/2to3.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ It can be converted to Python 3.x code via 2to3 on the command line::
3838
$ 2to3 example.py
3939

4040
A diff against the original source file is printed. 2to3 can also write the
41-
needed modifications right back to the source file. (Of course, a backup of the
42-
original is also be made unless :option:`-n` is also given.) Writing the
43-
changes back is enabled with the :option:`-w` flag::
41+
needed modifications right back to the source file. (A backup of the original
42+
file is made unless :option:`-n` is also given.) Writing the changes back is
43+
enabled with the :option:`-w` flag::
4444

4545
$ 2to3 -w example.py
4646

Doc/library/abc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ It also provides the following decorators:
150150

151151
.. note::
152152

153-
Unlike C++'s pure virtual functions, or Java abstract methods, these abstract
153+
Unlike Java abstract methods, these abstract
154154
methods may have an implementation. This implementation can be
155155
called via the :func:`super` mechanism from the class that
156156
overrides it. This could be useful as an end-point for a

Doc/library/cgi.rst

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,18 @@ Using the cgi module
6565

6666
Begin by writing ``import cgi``.
6767

68-
When you write a new script, consider adding the line::
68+
When you write a new script, consider adding these lines::
6969

70-
import cgitb; cgitb.enable()
70+
import cgitb
71+
cgitb.enable()
7172

7273
This activates a special exception handler that will display detailed reports in
7374
the Web browser if any errors occur. If you'd rather not show the guts of your
7475
program to users of your script, you can have the reports saved to files
75-
instead, with a line like this::
76+
instead, with code like this::
7677

77-
import cgitb; cgitb.enable(display=0, logdir="/tmp")
78+
import cgitb
79+
cgitb.enable(display=0, logdir="/tmp")
7880

7981
It's very helpful to use this feature during script development. The reports
8082
produced by :mod:`cgitb` provide information that can save you a lot of time in
@@ -445,9 +447,10 @@ discarded altogether.
445447

446448
Fortunately, once you have managed to get your script to execute *some* code,
447449
you can easily send tracebacks to the Web browser using the :mod:`cgitb` module.
448-
If you haven't done so already, just add the line::
450+
If you haven't done so already, just add the lines::
449451

450-
import cgitb; cgitb.enable()
452+
import cgitb
453+
cgitb.enable()
451454

452455
to the top of your script. Then try running it again; when a problem occurs,
453456
you should see a detailed report that will likely make apparent the cause of the

Doc/library/cgitb.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ as well as the values of the arguments and local variables to currently running
2424
functions, to help you debug the problem. Optionally, you can save this
2525
information to a file instead of sending it to the browser.
2626

27-
To enable this feature, simply add one line to the top of your CGI script::
27+
To enable this feature, simply add this to the top of your CGI script::
2828

29-
import cgitb; cgitb.enable()
29+
import cgitb
30+
cgitb.enable()
3031

3132
The options to the :func:`enable` function control whether the report is
3233
displayed in the browser and whether the report is logged to a file for later

Doc/library/stdtypes.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -793,9 +793,9 @@ functions based on regular expressions.
793793

794794
.. method:: str.count(sub[, start[, end]])
795795

796-
Return the number of occurrences of substring *sub* in the range [*start*,
797-
*end*]. Optional arguments *start* and *end* are interpreted as in slice
798-
notation.
796+
Return the number of non-overlapping occurrences of substring *sub* in the
797+
range [*start*, *end*]. Optional arguments *start* and *end* are
798+
interpreted as in slice notation.
799799

800800

801801
.. method:: str.encode([encoding[, errors]])
@@ -835,7 +835,7 @@ functions based on regular expressions.
835835
found.
836836

837837

838-
.. method:: str.format(format_string, *args, **kwargs)
838+
.. method:: str.format(*args, **kwargs)
839839

840840
Perform a string formatting operation. The *format_string* argument can
841841
contain literal text or replacement fields delimited by braces ``{}``. Each

Doc/library/xml.etree.elementtree.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,5 +529,5 @@ This is an example of counting the maximum depth of an XML file::
529529
.. [#] The encoding string included in XML output should conform to the
530530
appropriate standards. For example, "UTF-8" is valid, but "UTF8" is
531531
not. See http://www.w3.org/TR/2006/REC-xml11-20060816/#NT-EncodingDecl
532-
and http://www.iana.org/assignments/character-sets .
532+
and http://www.iana.org/assignments/character-sets.
533533

Doc/whatsnew/2.5.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1761,8 +1761,8 @@ ElementTree 1.2.6. The :mod:`cElementTree` accelerator module is also
17611761
included.
17621762

17631763
The rest of this section will provide a brief overview of using ElementTree.
1764-
Full documentation for ElementTree is available at http://effbot.org/zone
1765-
/element-index.htm.
1764+
Full documentation for ElementTree is available at
1765+
http://effbot.org/zone/element-index.htm.
17661766

17671767
ElementTree represents an XML document as a tree of element nodes. The text
17681768
content of the document is stored as the :attr:`.text` and :attr:`.tail`

0 commit comments

Comments
 (0)