diff options
author | Georg Brandl <georg@python.org> | 2010-10-06 08:13:26 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-10-06 08:13:26 (GMT) |
commit | 914a218fbe6d970059b4683d73a449cbc6cf5bf3 (patch) | |
tree | 70676b3283f96aff14ffc7aebdaf11a5d254f36f /Doc | |
parent | c7b6908bb1fbdbc5f36eb55fb423cab179ab4069 (diff) | |
download | cpython-914a218fbe6d970059b4683d73a449cbc6cf5bf3.zip cpython-914a218fbe6d970059b4683d73a449cbc6cf5bf3.tar.gz cpython-914a218fbe6d970059b4683d73a449cbc6cf5bf3.tar.bz2 |
Merged revisions 82629,82632,82724,82757-82758,82760-82763,82798-82799,82801 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k
........
r82629 | georg.brandl | 2010-07-07 20:51:43 +0200 (Mi, 07 Jul 2010) | 1 line
Make comment out of an awkward note.
........
r82632 | georg.brandl | 2010-07-07 21:04:36 +0200 (Mi, 07 Jul 2010) | 1 line
Turn more notes into comments.
........
r82724 | georg.brandl | 2010-07-09 09:33:15 +0200 (Fr, 09 Jul 2010) | 1 line
2.7 is now stable.
........
r82757 | georg.brandl | 2010-07-10 10:58:37 +0200 (Sa, 10 Jul 2010) | 1 line
Fix markup.
........
r82758 | georg.brandl | 2010-07-10 12:23:40 +0200 (Sa, 10 Jul 2010) | 1 line
Emphasize role of count for Pascal string.
........
r82760 | georg.brandl | 2010-07-10 12:39:57 +0200 (Sa, 10 Jul 2010) | 1 line
#3214: improve description of duck-typing in glossary.
........
r82761 | georg.brandl | 2010-07-10 13:40:13 +0200 (Sa, 10 Jul 2010) | 1 line
#1434090: properly append child in expatbuilder doctype handler.
........
r82762 | georg.brandl | 2010-07-10 13:51:06 +0200 (Sa, 10 Jul 2010) | 1 line
#8338: fix outdated class name.
........
r82763 | georg.brandl | 2010-07-10 14:01:34 +0200 (Sa, 10 Jul 2010) | 1 line
#8456: fix signature of sqlite3.connect().
........
r82798 | georg.brandl | 2010-07-11 11:23:11 +0200 (So, 11 Jul 2010) | 1 line
#6774: explain shutdown() behavior varying with platform.
........
r82799 | georg.brandl | 2010-07-11 11:26:57 +0200 (So, 11 Jul 2010) | 1 line
Fix typo.
........
r82801 | georg.brandl | 2010-07-11 11:33:39 +0200 (So, 11 Jul 2010) | 1 line
#9184: fix default value for "buffering" param of open().
........
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/distutils/apiref.rst | 5 | ||||
-rw-r--r-- | Doc/distutils/builtdist.rst | 4 | ||||
-rw-r--r-- | Doc/distutils/setupscript.rst | 4 | ||||
-rw-r--r-- | Doc/distutils/sourcedist.rst | 6 | ||||
-rw-r--r-- | Doc/glossary.rst | 6 | ||||
-rw-r--r-- | Doc/library/functions.rst | 2 | ||||
-rw-r--r-- | Doc/library/multiprocessing.rst | 4 | ||||
-rw-r--r-- | Doc/library/socket.rst | 4 | ||||
-rw-r--r-- | Doc/library/sqlite3.rst | 2 | ||||
-rw-r--r-- | Doc/library/struct.rst | 20 |
10 files changed, 28 insertions, 29 deletions
diff --git a/Doc/distutils/apiref.rst b/Doc/distutils/apiref.rst index 69ec0de..366c713 100644 --- a/Doc/distutils/apiref.rst +++ b/Doc/distutils/apiref.rst @@ -995,7 +995,7 @@ directories. errors are ignored (apart from being reported to ``sys.stdout`` if *verbose* is true). -**\*\*** Some of this could be replaced with the shutil module? **\*\*** +.. XXX Some of this could be replaced with the shutil module? :mod:`distutils.file_util` --- Single file operations @@ -1311,8 +1311,7 @@ provides the following additional features: the "negative alias" of :option:`--verbose`, then :option:`--quiet` on the command line sets *verbose* to false. -**\*\*** Should be replaced with :mod:`optik` (which is also now known as -:mod:`optparse` in Python 2.3 and later). **\*\*** +.. XXX Should be replaced with :mod:`optparse`. .. function:: fancy_getopt(options, negative_opt, object, args) diff --git a/Doc/distutils/builtdist.rst b/Doc/distutils/builtdist.rst index ee06fb4..4f086c6 100644 --- a/Doc/distutils/builtdist.rst +++ b/Doc/distutils/builtdist.rst @@ -146,8 +146,8 @@ commands. Creating dumb built distributions ================================= -**\*\*** Need to document absolute vs. prefix-relative packages here, but first -I have to implement it! **\*\*** +.. XXX Need to document absolute vs. prefix-relative packages here, but first + I have to implement it! .. _creating-rpms: diff --git a/Doc/distutils/setupscript.rst b/Doc/distutils/setupscript.rst index 5ec94c7..9208e36 100644 --- a/Doc/distutils/setupscript.rst +++ b/Doc/distutils/setupscript.rst @@ -207,7 +207,7 @@ However, you can also include SWIG interface (:file:`.i`) files in the list; the SWIG on the interface file and compile the resulting C/C++ file into your extension. -**\*\*** SWIG support is rough around the edges and largely untested! **\*\*** +.. XXX SWIG support is rough around the edges and largely untested! This warning notwithstanding, options to SWIG can be currently passed like this:: @@ -326,7 +326,7 @@ include the location in ``library_dirs``:: (Again, this sort of non-portable construct should be avoided if you intend to distribute your code.) -**\*\*** Should mention clib libraries here or somewhere else! **\*\*** +.. XXX Should mention clib libraries here or somewhere else! Other options diff --git a/Doc/distutils/sourcedist.rst b/Doc/distutils/sourcedist.rst index c2b4efe..0c29c19 100644 --- a/Doc/distutils/sourcedist.rst +++ b/Doc/distutils/sourcedist.rst @@ -68,10 +68,10 @@ source distribution: :option:`packages` options * all C source files mentioned in the :option:`ext_modules` or - :option:`libraries` options ( + :option:`libraries` options - **\*\*** getting C library sources currently broken---no - :meth:`get_source_files` method in :file:`build_clib.py`! **\*\***) + .. XXX Getting C library sources is currently broken -- no + :meth:`get_source_files` method in :file:`build_clib.py`! * scripts identified by the :option:`scripts` option See :ref:`distutils-installing-scripts`. diff --git a/Doc/glossary.rst b/Doc/glossary.rst index cc7b28e..8dea228 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -150,9 +150,9 @@ Glossary object. duck-typing - A pythonic programming style which determines an object's type by inspection - of its method or attribute signature rather than by explicit relationship - to some type object ("If it looks like a duck and quacks like a duck, it + A programming style which does not look at an object's type to determine + if it has the right interface; instead, the method or attribute is simply + called or used ("If it looks like a duck and quacks like a duck, it must be a duck.") By emphasizing interfaces rather than specific types, well-designed code improves its flexibility by allowing polymorphic substitution. Duck-typing avoids tests using :func:`type` or diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 38b55c5..d73b279 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -672,7 +672,7 @@ are always available. They are listed here in alphabetical order. :meth:`__index__` method that returns an integer. -.. function:: open(file, mode='r', buffering=None, encoding=None, errors=None, newline=None, closefd=True) +.. function:: open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True) Open *file* and return a corresponding stream. If the file cannot be opened, an :exc:`IOError` is raised. diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst index 7fbb258..bd79a3e 100644 --- a/Doc/library/multiprocessing.rst +++ b/Doc/library/multiprocessing.rst @@ -2217,8 +2217,8 @@ collect the results: An example of how a pool of worker processes can each run a -:class:`SimpleHTTPServer.HttpServer` instance while sharing a single listening -socket. +:class:`~http.server.SimpleHTTPRequestHandler` instance while sharing a single +listening socket. .. literalinclude:: ../includes/mp_webserver.py diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index 511d37b..931dd14 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -741,7 +741,9 @@ timeout error of its own regardless of any Python socket timeout setting. Shut down one or both halves of the connection. If *how* is :const:`SHUT_RD`, further receives are disallowed. If *how* is :const:`SHUT_WR`, further sends are disallowed. If *how* is :const:`SHUT_RDWR`, further sends and receives are - disallowed. + disallowed. Depending on the platform, shutting down one half of the connection + can also close the opposite half (e.g. on Mac OS X, ``shutdown(SHUT_WR)`` does + not allow further reads on the other end of the connection). Note that there are no methods :meth:`read` or :meth:`write`; use :meth:`~socket.recv` and :meth:`~socket.send` without *flags* argument instead. diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index d542cbb..8cd5ba6 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -136,7 +136,7 @@ Module functions and constants first blank for the column name: the column name would simply be "x". -.. function:: connect(database[, timeout, isolation_level, detect_types, factory]) +.. function:: connect(database[, timeout, detect_types, isolation_level, check_same_thread, factory, cached_statements]) Opens a connection to the SQLite database file *database*. You can use ``":memory:"`` to open a database connection to a database that resides in RAM diff --git a/Doc/library/struct.rst b/Doc/library/struct.rst index 6fbce6c..1834cfd 100644 --- a/Doc/library/struct.rst +++ b/Doc/library/struct.rst @@ -251,18 +251,16 @@ then :exc:`struct.error` is raised. In 3.0, some of the integer formats wrapped out-of-range values and raised :exc:`DeprecationWarning` instead of :exc:`struct.error`. - The ``'p'`` format character encodes a "Pascal string", meaning a short -variable-length string stored in a fixed number of bytes. The count is the total -number of bytes stored. The first byte stored is the length of the string, or -255, whichever is smaller. The bytes of the string follow. If the string -passed in to :func:`pack` is too long (longer than the count minus 1), only the -leading count-1 bytes of the string are stored. If the string is shorter than -count-1, it is padded with null bytes so that exactly count bytes in all are -used. Note that for :func:`unpack`, the ``'p'`` format character consumes count -bytes, but that the string returned can never contain more than 255 bytes. - - +variable-length string stored in a *fixed number of bytes*, given by the count. +The first byte stored is the length of the string, or 255, whichever is +smaller. The bytes of the string follow. If the string passed in to +:func:`pack` is too long (longer than the count minus 1), only the leading +``count-1`` bytes of the string are stored. If the string is shorter than +``count-1``, it is padded with null bytes so that exactly count bytes in all +are used. Note that for :func:`unpack`, the ``'p'`` format character consumes +``count`` bytes, but that the string returned can never contain more than 255 +bytes. For the ``'?'`` format character, the return value is either :const:`True` or :const:`False`. When packing, the truth value of the argument object is used. |