Skip to content

Commit 8a1e4c4

Browse files
committed
Merged revisions 72661,72675-72677,72679,72712,72801,72820 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r72661 | georg.brandl | 2009-05-15 10:03:03 +0200 (Fr, 15 Mai 2009) | 1 line Fix example output for doctest-like demos. ........ r72675 | georg.brandl | 2009-05-16 13:13:21 +0200 (Sa, 16 Mai 2009) | 1 line #6034: clarify __reversed__ doc. ........ r72676 | georg.brandl | 2009-05-16 13:14:46 +0200 (Sa, 16 Mai 2009) | 1 line #6025: fix signature of parse(). ........ r72677 | georg.brandl | 2009-05-16 13:18:55 +0200 (Sa, 16 Mai 2009) | 1 line #6009: undocument default argument of Option as deprecated. ........ r72679 | georg.brandl | 2009-05-16 13:24:41 +0200 (Sa, 16 Mai 2009) | 1 line Fix about and bugs pages to match real workflow. ........ r72712 | georg.brandl | 2009-05-17 10:55:00 +0200 (So, 17 Mai 2009) | 1 line #5935: mention that BROWSER is looked for in PATH. ........ r72801 | georg.brandl | 2009-05-20 20:31:14 +0200 (Mi, 20 Mai 2009) | 1 line #6055: refer to "sqlite3" consistently. ........ r72820 | georg.brandl | 2009-05-22 09:23:32 +0200 (Fr, 22 Mai 2009) | 1 line Use raise X(y). ........
1 parent 0c31562 commit 8a1e4c4

File tree

9 files changed

+44
-31
lines changed

9 files changed

+44
-31
lines changed

Doc/about.rst

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ These documents are generated from `reStructuredText
77
<http://docutils.sf.net/rst.html>`_ sources by *Sphinx*, a document processor
88
specifically written for the Python documentation.
99

10-
In the online version of these documents, you can submit comments and suggest
11-
changes directly on the documentation pages.
10+
.. In the online version of these documents, you can submit comments and suggest
11+
changes directly on the documentation pages.
1212
1313
Development of the documentation and its toolchain takes place on the
1414
docs@python.org mailing list. We're always looking for volunteers wanting
@@ -24,7 +24,8 @@ Many thanks go to:
2424
<http://effbot.org/zone/pyref.htm>`_ project from which Sphinx got many good
2525
ideas.
2626

27-
See :ref:`reporting-bugs` for information how to report bugs in Python itself.
27+
See :ref:`reporting-bugs` for information how to report bugs in this
28+
documentation, or Python itself.
2829

2930
.. including the ACKS file here so that it can be maintained separately
3031
.. include:: ACKS.txt

Doc/bugs.rst

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ the problem has already been fixed for the next release, or additional
1919
information is needed (in which case you are welcome to provide it if you can!).
2020
To do this, search the bug database using the search box on the top of the page.
2121

22+
In the case of documentation bugs, look at the most recent development docs at
23+
http://docs.python.org/dev to see if the bug has been fixed.
24+
2225
If the problem you're reporting is not already in the bug tracker, go back to
2326
the Python Bug Tracker. If you don't already have a tracker account, select the
2427
"Register" link in the sidebar and undergo the registration procedure.

Doc/includes/sqlite3/text_factory.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
row = cur.fetchone()
1414
assert row[0] == AUSTRIA
1515

16-
# but we can make pysqlite always return bytestrings ...
16+
# but we can make sqlite3 always return bytestrings ...
1717
con.text_factory = str
1818
cur.execute("select ?", (AUSTRIA,))
1919
row = cur.fetchone()
@@ -26,11 +26,12 @@
2626
# here we implement one that will ignore Unicode characters that cannot be
2727
# decoded from UTF-8
2828
con.text_factory = lambda x: str(x, "utf-8", "ignore")
29-
cur.execute("select ?", ("this is latin1 and would normally create errors" + "\xe4\xf6\xfc".encode("latin1"),))
29+
cur.execute("select ?", ("this is latin1 and would normally create errors" +
30+
"\xe4\xf6\xfc".encode("latin1"),))
3031
row = cur.fetchone()
3132
assert type(row[0]) == str
3233

33-
# pysqlite offers a builtin optimized text_factory that will return bytestring
34+
# sqlite3 offers a builtin optimized text_factory that will return bytestring
3435
# objects, if the data is in ASCII only, and otherwise return unicode objects
3536
con.text_factory = sqlite3.OptimizedUnicode
3637
cur.execute("select ?", (AUSTRIA,))

Doc/library/ctypes.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,9 @@ within *IDLE* or *PythonWin*::
338338
>>> printf("Hello, %s\n", "World!")
339339
Hello, World!
340340
14
341-
>>> printf("Hello, %S", u"World!")
341+
>>> printf("Hello, %S\n", u"World!")
342342
Hello, World!
343-
13
343+
14
344344
>>> printf("%d bottles of beer\n", 42)
345345
42 bottles of beer
346346
19
@@ -355,7 +355,7 @@ unicode strings have to be wrapped in their corresponding ``ctypes`` type, so
355355
that they can be converted to the required C data type::
356356

357357
>>> printf("An int %d, a double %f\n", 1234, c_double(3.14))
358-
Integer 1234, double 3.1400001049
358+
An int 1234, a double 3.140000
359359
31
360360
>>>
361361

@@ -411,9 +411,9 @@ prototype for a C function), and tries to convert the arguments to valid types::
411411
Traceback (most recent call last):
412412
File "<stdin>", line 1, in ?
413413
ArgumentError: argument 2: exceptions.TypeError: wrong type
414-
>>> printf("%s %d %f", "X", 2, 3)
415-
X 2 3.00000012
416-
12
414+
>>> printf("%s %d %f\n", "X", 2, 3)
415+
X 2 3.000000
416+
13
417417
>>>
418418

419419
If you have defined your own classes which you pass to function calls, you have

Doc/library/optparse.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1072,10 +1072,10 @@ to a particular option, or fail to pass a required option attribute,
10721072
tells :mod:`optparse` where to write it: :attr:`dest` names an attribute of the
10731073
``options`` object that :mod:`optparse` builds as it parses the command line.
10741074

1075-
* ``default`` (deprecated)
1075+
* ``default``
10761076

10771077
The value to use for this option's destination if the option is not seen on the
1078-
command line. Deprecated; use ``parser.set_defaults()`` instead.
1078+
command line. See also ``parser.set_defaults()``.
10791079

10801080
* ``nargs`` (default: 1)
10811081

Doc/library/sqlite3.rst

+12-10
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ SQLite for internal data storage. It's also possible to prototype an
1313
application using SQLite and then port the code to a larger database such as
1414
PostgreSQL or Oracle.
1515

16-
pysqlite was written by Gerhard Häring and provides a SQL interface compliant
16+
sqlite3 was written by Gerhard Häring and provides a SQL interface compliant
1717
with the DB-API 2.0 specification described by :pep:`249`.
1818

1919
To use the module, you must first create a :class:`Connection` object that
@@ -50,8 +50,9 @@ is insecure; it makes your program vulnerable to an SQL injection attack.
5050

5151
Instead, use the DB-API's parameter substitution. Put ``?`` as a placeholder
5252
wherever you want to use a value, and then provide a tuple of values as the
53-
second argument to the cursor's :meth:`~Cursor.execute` method. (Other database modules
54-
may use a different placeholder, such as ``%s`` or ``:1``.) For example::
53+
second argument to the cursor's :meth:`~Cursor.execute` method. (Other database
54+
modules may use a different placeholder, such as ``%s`` or ``:1``.) For
55+
example::
5556

5657
# Never do this -- insecure!
5758
symbol = 'IBM'
@@ -90,11 +91,12 @@ This example uses the iterator form::
9091
.. seealso::
9192

9293
http://www.pysqlite.org
93-
The pysqlite web page.
94+
The pysqlite web page -- sqlite3 is developed externally under the name
95+
"pysqlite".
9496

9597
http://www.sqlite.org
96-
The SQLite web page; the documentation describes the syntax and the available
97-
data types for the supported SQL dialect.
98+
The SQLite web page; the documentation describes the syntax and the
99+
available data types for the supported SQL dialect.
98100

99101
:pep:`249` - Database API Specification 2.0
100102
PEP written by Marc-André Lemburg.
@@ -784,10 +786,10 @@ So if you are within a transaction and issue a command like ``CREATE TABLE
784786
...``, ``VACUUM``, ``PRAGMA``, the :mod:`sqlite3` module will commit implicitly
785787
before executing that command. There are two reasons for doing that. The first
786788
is that some of these commands don't work within transactions. The other reason
787-
is that pysqlite needs to keep track of the transaction state (if a transaction
789+
is that sqlite3 needs to keep track of the transaction state (if a transaction
788790
is active or not).
789791

790-
You can control which kind of ``BEGIN`` statements pysqlite implicitly executes
792+
You can control which kind of ``BEGIN`` statements sqlite3 implicitly executes
791793
(or none at all) via the *isolation_level* parameter to the :func:`connect`
792794
call, or via the :attr:`isolation_level` property of connections.
793795

@@ -799,8 +801,8 @@ statement, or set it to one of SQLite's supported isolation levels: "DEFERRED",
799801

800802

801803

802-
Using pysqlite efficiently
803-
--------------------------
804+
Using :mod:`sqlite3` efficiently
805+
--------------------------------
804806

805807

806808
Using shortcut methods

Doc/library/webbrowser.rst

+7-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ override the platform default list of browsers, as a os.pathsep-separated list
2222
of browsers to try in order. When the value of a list part contains the string
2323
``%s``, then it is interpreted as a literal browser command line to be used
2424
with the argument URL substituted for ``%s``; if the part does not contain
25-
``%s``, it is simply interpreted as the name of the browser to launch.
25+
``%s``, it is simply interpreted as the name of the browser to launch. [1]_
2626

2727
For non-Unix platforms, or when a remote browser is available on Unix, the
2828
controlling process will not wait for the user to finish with the browser, but
@@ -193,3 +193,9 @@ module-level convenience functions:
193193

194194
Open *url* in a new page ("tab") of the browser handled by this controller, if
195195
possible, otherwise equivalent to :func:`open_new`.
196+
197+
198+
.. rubric:: Footnotes
199+
200+
.. [1] Executables named here without a full path will be searched in the
201+
directories given in the :envvar:`PATH` environment variable.

Doc/library/xml.dom.minidom.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ DOM applications typically start by parsing some XML into a DOM. With
2828
The :func:`parse` function can take either a filename or an open file object.
2929

3030

31-
.. function:: parse(filename_or_file, parser)
31+
.. function:: parse(filename_or_file[, parser[, bufsize]])
3232

3333
Return a :class:`Document` from the given input. *filename_or_file* may be
3434
either a file name, or a file-like object. *parser*, if given, must be a SAX2

Doc/reference/datamodel.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -1700,11 +1700,11 @@ through the container; for mappings, :meth:`__iter__` should be the same as
17001700
reverse iteration. It should return a new iterator object that iterates
17011701
over all the objects in the container in reverse order.
17021702

1703-
If the :meth:`__reversed__` method is not provided, the
1704-
:func:`reversed` builtin will fall back to using the sequence protocol
1705-
(:meth:`__len__` and :meth:`__getitem__`). Objects should normally
1706-
only provide :meth:`__reversed__` if they do not support the sequence
1707-
protocol and an efficient implementation of reverse iteration is possible.
1703+
If the :meth:`__reversed__` method is not provided, the :func:`reversed`
1704+
builtin will fall back to using the sequence protocol (:meth:`__len__` and
1705+
:meth:`__getitem__`). Objects that support the sequence protocol should
1706+
only provide :meth:`__reversed__` if they can provide an implementation
1707+
that is more efficient than the one provided by :func:`reversed`.
17081708

17091709

17101710
The membership test operators (:keyword:`in` and :keyword:`not in`) are normally

0 commit comments

Comments
 (0)