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().
........
This commit is contained in:
Georg Brandl 2010-10-06 08:13:26 +00:00
parent c7b6908bb1
commit 914a218fbe
12 changed files with 30 additions and 31 deletions

View File

@ -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)

View File

@ -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:

View File

@ -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

View File

@ -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`.

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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.

View File

@ -242,7 +242,7 @@ class ExpatBuilder:
doctype = self.document.implementation.createDocumentType(
doctypeName, publicId, systemId)
doctype.ownerDocument = self.document
self.document.childNodes.append(doctype)
_append_child(self.document, doctype)
self.document.doctype = doctype
if self._filter and self._filter.acceptNode(doctype) == FILTER_REJECT:
self.document.doctype = None

View File

@ -176,7 +176,7 @@ PyObject *PyExc_BlockingIOError = (PyObject *)&_PyExc_BlockingIOError;
* The main open() function
*/
PyDoc_STRVAR(open_doc,
"open(file, mode='r', buffering=None, encoding=None,\n"
"open(file, mode='r', buffering=-1, encoding=None,\n"
" errors=None, newline=None, closefd=True) -> file object\n"
"\n"
"Open file and return a stream. Raise IOError upon failure.\n"