Merged revisions 73286,73294,73296,73459,73462-73463,73544,73576-73577,73595-73596...
authorGeorg Brandl <georg@python.org>
Tue, 27 Oct 2009 14:29:22 +0000 (14:29 +0000)
committerGeorg Brandl <georg@python.org>
Tue, 27 Oct 2009 14:29:22 +0000 (14:29 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r73286 | georg.brandl | 2009-06-08 09:57:35 +0200 (Mo, 08 Jun 2009) | 1 line

  Remove period from end of headings.
........
  r73294 | georg.brandl | 2009-06-08 15:34:52 +0200 (Mo, 08 Jun 2009) | 1 line

  #6194: O_SHLOCK/O_EXLOCK are not really more platform independent than lockf().
........
  r73296 | georg.brandl | 2009-06-08 18:03:41 +0200 (Mo, 08 Jun 2009) | 1 line

  #6238: add fillchar to string.just function family.
........
  r73459 | raymond.hettinger | 2009-06-17 03:43:47 +0200 (Mi, 17 Jun 2009) | 1 line

  Add usage note.
........
  r73462 | georg.brandl | 2009-06-17 11:36:21 +0200 (Mi, 17 Jun 2009) | 1 line

  #6295: clarify blocking behavior of getch().
........
  r73463 | georg.brandl | 2009-06-17 11:43:31 +0200 (Mi, 17 Jun 2009) | 1 line

  #6255: document PyInt_FromSize_t.
........
  r73544 | georg.brandl | 2009-06-24 08:41:19 +0200 (Mi, 24 Jun 2009) | 1 line

  #6332: fix word dupes throughout the source.
........
  r73576 | benjamin.peterson | 2009-06-27 01:37:06 +0200 (Sa, 27 Jun 2009) | 1 line

  document is_declared_global()
........
  r73577 | benjamin.peterson | 2009-06-27 16:16:23 +0200 (Sa, 27 Jun 2009) | 1 line

  link to extensive generator docs in the reference manual
........
  r73595 | ezio.melotti | 2009-06-28 01:45:39 +0200 (So, 28 Jun 2009) | 1 line

  stmt and setup can contain multiple statements, see #5896
........
  r73596 | ezio.melotti | 2009-06-28 02:07:45 +0200 (So, 28 Jun 2009) | 1 line

  Fixed a wrong apostrophe
........
  r73693 | jesse.noller | 2009-06-29 20:20:34 +0200 (Mo, 29 Jun 2009) | 1 line

  Bug 5906: add a documentation note for unix daemons vs. multiprocessing daemons
........
  r73694 | jesse.noller | 2009-06-29 20:24:26 +0200 (Mo, 29 Jun 2009) | 1 line

  Issue 5740: multiprocessing.connection.* authkey fixes
........
  r73704 | georg.brandl | 2009-06-30 18:15:43 +0200 (Di, 30 Jun 2009) | 1 line

  #6376: fix copy-n-paste oversight.
........
  r73705 | georg.brandl | 2009-06-30 18:17:28 +0200 (Di, 30 Jun 2009) | 1 line

  #6374: add a bit of explanation about shell=True on Windows.
........
  r73707 | georg.brandl | 2009-06-30 18:35:11 +0200 (Di, 30 Jun 2009) | 1 line

  #6371: fix link targets.
........
  r73713 | ezio.melotti | 2009-07-01 00:56:16 +0200 (Mi, 01 Jul 2009) | 1 line

  Fixed a backslash that was not supposed to be there
........
  r73937 | georg.brandl | 2009-07-11 12:12:36 +0200 (Sa, 11 Jul 2009) | 1 line

  Fix style.
........
  r73938 | georg.brandl | 2009-07-11 12:14:54 +0200 (Sa, 11 Jul 2009) | 1 line

  #6446: fix import_spam() function to use correct error and reference handling.
........
  r73939 | georg.brandl | 2009-07-11 12:18:10 +0200 (Sa, 11 Jul 2009) | 1 line

  #6448: clarify docs for find_module().
........
  r73940 | georg.brandl | 2009-07-11 12:37:38 +0200 (Sa, 11 Jul 2009) | 1 line

  #6430: add note about size of "u" type.
........
  r73945 | georg.brandl | 2009-07-11 12:51:31 +0200 (Sa, 11 Jul 2009) | 1 line

  #6456: clarify the meaning of constants used as arguments to nl_langinfo().
........
  r73951 | georg.brandl | 2009-07-11 16:23:38 +0200 (Sa, 11 Jul 2009) | 2 lines

  array.array is actually a class.
........
  r73979 | benjamin.peterson | 2009-07-12 18:56:54 +0200 (So, 12 Jul 2009) | 1 line

  add versionadded
........

30 files changed:
Doc/c-api/import.rst
Doc/c-api/int.rst
Doc/extending/extending.rst
Doc/library/array.rst
Doc/library/cgi.rst
Doc/library/contextlib.rst
Doc/library/ctypes.rst
Doc/library/curses.panel.rst
Doc/library/curses.rst
Doc/library/decimal.rst
Doc/library/fcntl.rst
Doc/library/imp.rst
Doc/library/locale.rst
Doc/library/multiprocessing.rst
Doc/library/optparse.rst
Doc/library/pickletools.rst
Doc/library/platform.rst
Doc/library/stdtypes.rst
Doc/library/string.rst
Doc/library/subprocess.rst
Doc/library/symtable.rst
Doc/library/timeit.rst
Doc/library/warnings.rst
Doc/using/cmdline.rst
Misc/HISTORY
Misc/NEWS
Misc/Porting
Misc/cheatsheet
Misc/developers.txt
Misc/python.man

index c4816f5ed9909ef5d90ef2f7709b495cedf1af9d..510544edb3dd57cae2426c245af703148e242aab 100644 (file)
@@ -28,10 +28,10 @@ Importing Modules
    leaves the module in ``sys.modules``.
 
    .. versionchanged:: 2.4
-      failing imports remove incomplete module objects.
+      Failing imports remove incomplete module objects.
 
    .. versionchanged:: 2.6
-      always use absolute imports
+      Always uses absolute imports.
 
 
 .. cfunction:: PyObject* PyImport_ImportModuleNoBlock(const char *name)
@@ -62,7 +62,7 @@ Importing Modules
    unless a non-empty *fromlist* was given.
 
    .. versionchanged:: 2.4
-      failing imports remove incomplete module objects.
+      Failing imports remove incomplete module objects.
 
    .. versionchanged:: 2.6
       The function is an alias for :cfunc:`PyImport_ImportModuleLevel` with
@@ -95,7 +95,7 @@ Importing Modules
    are installed in the current environment, e.g. by :mod:`rexec` or :mod:`ihooks`.
 
    .. versionchanged:: 2.6
-      always use absolute imports
+      Always uses absolute imports.
 
 
 .. cfunction:: PyObject* PyImport_ReloadModule(PyObject *m)
index ef82100324c7f5ee23160e3956e0e233e753672a..9ff0347d05c71df891e23c463b932ef801d6a937 100644 (file)
@@ -68,6 +68,15 @@ Plain Integer Objects
 
 .. cfunction:: PyObject* PyInt_FromSsize_t(Py_ssize_t ival)
 
+   Create a new integer object with a value of *ival*. If the value is larger
+   than ``LONG_MAX`` or smaller than ``LONG_MIN``, a long integer object is
+   returned.
+
+   .. versionadded:: 2.5
+
+
+.. cfunction:: PyObject* PyInt_FromSize_t(size_t ival)
+
    Create a new integer object with a value of *ival*. If the value exceeds
    ``LONG_MAX``, a long integer object is returned.
 
index d052ec24c65d8fa102b149a73e0b6a312f09d84e..5c99c3db27ab345515659c12bed3d9e208b26cc0 100644 (file)
@@ -1219,16 +1219,23 @@ like this::
    static int
    import_spam(void)
    {
-       PyObject *module = PyImport_ImportModule("spam");
-
-       if (module != NULL) {
-           PyObject *c_api_object = PyObject_GetAttrString(module, "_C_API");
-           if (c_api_object == NULL)
-               return -1;
-           if (PyCObject_Check(c_api_object))
-               PySpam_API = (void **)PyCObject_AsVoidPtr(c_api_object);
-           Py_DECREF(c_api_object);
+       PyObject *c_api_object;
+       PyObject *module;
+
+       module = PyImport_ImportModule("spam");
+       if (module == NULL)
+           return -1;
+
+       c_api_object = PyObject_GetAttrString(module, "_C_API");
+       if (c_api_object == NULL) {
+           Py_DECREF(module);
+           return -1;
        }
+       if (PyCObject_Check(c_api_object))
+           PySpam_API = (void **)PyCObject_AsVoidPtr(c_api_object);
+
+       Py_DECREF(c_api_object);
+       Py_DECREF(module);
        return 0;
    }
 
index 3b247b7700b83a23e7807017d12d7417a2d4e34a..f7fb4e372c6e78f7da899afe23d7a3bfcab7ff87 100644 (file)
@@ -24,7 +24,7 @@ defined:
 +-----------+----------------+-------------------+-----------------------+
 | ``'B'``   | unsigned char  | int               | 1                     |
 +-----------+----------------+-------------------+-----------------------+
-| ``'u'``   | Py_UNICODE     | Unicode character | 2                     |
+| ``'u'``   | Py_UNICODE     | Unicode character | 2 (see note)          |
 +-----------+----------------+-------------------+-----------------------+
 | ``'h'``   | signed short   | int               | 2                     |
 +-----------+----------------+-------------------+-----------------------+
@@ -43,6 +43,11 @@ defined:
 | ``'d'``   | double         | float             | 8                     |
 +-----------+----------------+-------------------+-----------------------+
 
+.. note::
+
+   The ``'u'`` typecode corresponds to Python's unicode character.  On narrow
+   Unicode builds this is 2-bytes, on wide builds this is 4-bytes.
+
 The actual representation of values is determined by the machine architecture
 (strictly speaking, by the C implementation).  The actual size can be accessed
 through the :attr:`itemsize` attribute.  The values stored  for ``'L'`` and
@@ -53,9 +58,9 @@ unsigned (long) integers.
 The module defines the following type:
 
 
-.. function:: array(typecode[, initializer])
+.. class:: array(typecode[, initializer])
 
-   Return a new array whose items are restricted by *typecode*, and initialized
+   A new array whose items are restricted by *typecode*, and initialized
    from the optional *initializer* value, which must be a list, string, or iterable
    over elements of the appropriate type.
 
@@ -70,7 +75,7 @@ The module defines the following type:
 
 .. data:: ArrayType
 
-   Obsolete alias for :func:`array`.
+   Obsolete alias for :class:`array`.
 
 Array objects support the ordinary sequence operations of indexing, slicing,
 concatenation, and multiplication.  When using slice assignment, the assigned
@@ -80,7 +85,6 @@ and may be used wherever buffer objects are supported.
 
 The following data items and methods are also supported:
 
-
 .. attribute:: array.typecode
 
    The typecode character used to create the array.
index 3879e0d9f207e0c50e89c1f3af2f44843d83680d..1e14e4b14dc71194039b9fa3f35c32e18caeea79 100644 (file)
@@ -1,6 +1,5 @@
-
-:mod:`cgi` --- Common Gateway Interface support.
-================================================
+:mod:`cgi` --- Common Gateway Interface support
+===============================================
 
 .. module:: cgi
    :synopsis: Helpers for running Python scripts via the Common Gateway Interface.
index 935afeeba907295b3d0ee06d16d97714b3fb06f7..b5e9aa87998729ff08fa84c27ea909356d28f7c5 100644 (file)
@@ -1,6 +1,5 @@
-
-:mod:`contextlib` --- Utilities for :keyword:`with`\ -statement contexts.
-=========================================================================
+:mod:`contextlib` --- Utilities for :keyword:`with`\ -statement contexts
+========================================================================
 
 .. module:: contextlib
    :synopsis: Utilities for with-statement contexts.
index eca14d6a60023aca475f9836d7d8f5666032f614..10e61de14343d45582c73672e7ad65fe8b9b4b2a 100644 (file)
@@ -1,6 +1,5 @@
-
-:mod:`ctypes` --- A foreign function library for Python.
-========================================================
+:mod:`ctypes` --- A foreign function library for Python
+=======================================================
 
 .. module:: ctypes
    :synopsis: A foreign function library for Python.
index 59e5b86f1912de8950d28bfc1035d965a7affd05..a3c8bda63c2c1dbcb119c33a75594a7bf0f42c82 100644 (file)
@@ -1,6 +1,5 @@
-
-:mod:`curses.panel` --- A panel stack extension for curses.
-===========================================================
+:mod:`curses.panel` --- A panel stack extension for curses
+==========================================================
 
 .. module:: curses.panel
    :synopsis: A panel stack extension that adds depth to  curses windows.
index c3f1c51040a715e351fb2026e75d42792230219c..01689a23a86b458674f4195c70e88914b3646f4b 100644 (file)
@@ -796,7 +796,8 @@ the following methods:
 
    Get a character. Note that the integer returned does *not* have to be in ASCII
    range: function keys, keypad keys and so on return numbers higher than 256. In
-   no-delay mode, -1 is returned if there is  no input.
+   no-delay mode, -1 is returned if there is no input, else :func:`getch` waits
+   until a key is pressed.
 
 
 .. method:: window.getkey([y, x])
index 6e45e84721e14f3f0c0a083a4e9b93b19d2fd0b9..ca902917d1001ed62fc417a22c573702e245d55a 100644 (file)
@@ -607,10 +607,9 @@ Decimal objects
 
       .. versionadded:: 2.6
 
-   .. method:: logical_invert(other[, context])
+   .. method:: logical_invert([context])
 
-      :meth:`logical_invert` is a logical operation.  The argument must
-      be a *logical operand* (see :ref:`logical_operands_label`).  The
+      :meth:`logical_invert` is a logical operation.  The
       result is the digit-wise inversion of the operand.
 
       .. versionadded:: 2.6
index fa0b3cba976fd851845bd4c9fb5ae55f40ff206f..b186d14f7a5d06f380333b818ebd9924a7471a68 100644 (file)
@@ -151,7 +151,6 @@ lay-out for the *lockdata* variable is system dependent --- therefore using the
 
    Module :mod:`os`
       If the locking flags :const:`O_SHLOCK` and :const:`O_EXLOCK` are present
-      in the :mod:`os` module, the :func:`os.open` function provides a more
-      platform-independent alternative to the :func:`lockf` and :func:`flock`
-      functions.
+      in the :mod:`os` module (on BSD only), the :func:`os.open` function
+      provides an alternative to the :func:`lockf` and :func:`flock` functions.
 
index 1d3c2f670976e1d1b9d46b9afa5eaf8f788429ca..cf4655b9f0b986226efbc88bea39913def19a260 100644 (file)
@@ -34,16 +34,17 @@ This module provides an interface to the mechanisms used to implement the
 
 .. function:: find_module(name[, path])
 
-   Try to find the module *name* on the search path *path*.  If *path* is a list
-   of directory names, each directory is searched for files with any of the
-   suffixes returned by :func:`get_suffixes` above.  Invalid names in the list
-   are silently ignored (but all list items must be strings).  If *path* is
-   omitted or ``None``, the list of directory names given by ``sys.path`` is
-   searched, but first it searches a few special places: it tries to find a
-   built-in module with the given name (:const:`C_BUILTIN`), then a frozen
-   module (:const:`PY_FROZEN`), and on some systems some other places are looked
-   in as well (on Windows, it looks in the registry which may point to a
-   specific file).
+   Try to find the module *name*.  If *path* is omitted or ``None``, the list of
+   directory names given by ``sys.path`` is searched, but first a few special
+   places are searched: the function tries to find a built-in module with the
+   given name (:const:`C_BUILTIN`), then a frozen module (:const:`PY_FROZEN`),
+   and on some systems some other places are looked in as well (on Windows, it
+   looks in the registry which may point to a specific file).
+
+   Otherwise, *path* must be a list of directory names; each directory is
+   searched for files with any of the suffixes returned by :func:`get_suffixes`
+   above.  Invalid names in the list are silently ignored (but all list items
+   must be strings).
 
    If search is successful, the return value is a 3-element tuple ``(file,
    pathname, description)``:
index 0366d7796653d7b72264f0822058569712809505..af2fd4b6f60e7dc6c119431d64250a93186621bf 100644 (file)
@@ -148,10 +148,124 @@ The :mod:`locale` module defines the following exception and functions:
 
 .. function:: nl_langinfo(option)
 
-   Return some locale-specific information as a string. This function is not
-   available on all systems, and the set of possible options might also vary across
-   platforms. The possible argument values are numbers, for which symbolic
-   constants are available in the locale module.
+   Return some locale-specific information as a string.  This function is not
+   available on all systems, and the set of possible options might also vary
+   across platforms.  The possible argument values are numbers, for which
+   symbolic constants are available in the locale module.
+
+   The :func:`nl_langinfo` function accepts one of the following keys.  Most
+   descriptions are taken from the corresponding description in the GNU C
+   library.
+
+   .. data:: CODESET
+
+      Get a string with the name of the character encoding used in the
+      selected locale.
+
+   .. data:: D_T_FMT
+
+      Get a string that can be used as a format string for :func:`strftime` to
+      represent time and date in a locale-specific way.
+
+   .. data:: D_FMT
+
+      Get a string that can be used as a format string for :func:`strftime` to
+      represent a date in a locale-specific way.
+
+   .. data:: T_FMT
+
+      Get a string that can be used as a format string for :func:`strftime` to
+      represent a time in a locale-specific way.
+
+   .. data:: T_FMT_AMPM
+
+      Get a format string for :func:`strftime` to represent time in the am/pm
+      format.
+
+   .. data:: DAY_1 ... DAY_7
+
+      Get the name of the n-th day of the week.
+
+      .. note::
+
+         This follows the US convention of :const:`DAY_1` being Sunday, not the
+         international convention (ISO 8601) that Monday is the first day of the
+         week.
+
+   .. data:: ABDAY_1 ... ABDAY_7
+
+      Get the abbreviated name of the n-th day of the week.
+
+   .. data:: MON_1 ... MON_12
+
+      Get the name of the n-th month.
+
+   .. data:: ABMON_1 ... ABMON_12
+
+      Get the abbreviated name of the n-th month.
+
+   .. data:: RADIXCHAR
+
+      Get the radix character (decimal dot, decimal comma, etc.)
+
+   .. data:: THOUSEP
+
+      Get the separator character for thousands (groups of three digits).
+
+   .. data:: YESEXPR
+
+      Get a regular expression that can be used with the regex function to
+      recognize a positive response to a yes/no question.
+
+      .. note::
+
+         The expression is in the syntax suitable for the :cfunc:`regex` function
+         from the C library, which might differ from the syntax used in :mod:`re`.
+
+   .. data:: NOEXPR
+
+      Get a regular expression that can be used with the regex(3) function to
+      recognize a negative response to a yes/no question.
+
+   .. data:: CRNCYSTR
+
+      Get the currency symbol, preceded by "-" if the symbol should appear before
+      the value, "+" if the symbol should appear after the value, or "." if the
+      symbol should replace the radix character.
+
+   .. data:: ERA
+
+      Get a string that represents the era used in the current locale.
+
+      Most locales do not define this value.  An example of a locale which does
+      define this value is the Japanese one.  In Japan, the traditional
+      representation of dates includes the name of the era corresponding to the
+      then-emperor's reign.
+
+      Normally it should not be necessary to use this value directly. Specifying
+      the ``E`` modifier in their format strings causes the :func:`strftime`
+      function to use this information.  The format of the returned string is not
+      specified, and therefore you should not assume knowledge of it on different
+      systems.
+
+   .. data:: ERA_YEAR
+
+      Get the year in the relevant era of the locale.
+
+   .. data:: ERA_D_T_FMT
+
+      Get a format string for :func:`strftime` to represent dates and times in a
+      locale-specific era-based way.
+
+   .. data:: ERA_D_FMT
+
+      Get a format string for :func:`strftime` to represent time in a
+      locale-specific era-based way.
+
+   .. data:: ALT_DIGITS
+
+      Get a representation of up to 100 values used to represent the values
+      0 to 99.
 
 
 .. function:: getdefaultlocale([envvars])
@@ -360,140 +474,13 @@ The :mod:`locale` module defines the following exception and functions:
    This is a symbolic constant used for different values returned by
    :func:`localeconv`.
 
-The :func:`nl_langinfo` function accepts one of the following keys. Most
-descriptions are taken from the corresponding description in the GNU C library.
-
-
-.. data:: CODESET
-
-   Return a string with the name of the character encoding used in the selected
-   locale.
-
-
-.. data:: D_T_FMT
-
-   Return a string that can be used as a format string for strftime(3) to represent
-   time and date in a locale-specific way.
-
-
-.. data:: D_FMT
-
-   Return a string that can be used as a format string for strftime(3) to represent
-   a date in a locale-specific way.
-
-
-.. data:: T_FMT
-
-   Return a string that can be used as a format string for strftime(3) to represent
-   a time in a locale-specific way.
-
-
-.. data:: T_FMT_AMPM
-
-   The return value can be used as a format string for 'strftime' to represent time
-   in the am/pm format.
-
-
-.. data:: DAY_1 ... DAY_7
-
-   Return name of the n-th day of the week.
-
-   .. note::
-
-      This follows the US convention of :const:`DAY_1` being Sunday, not the
-      international convention (ISO 8601) that Monday is the first day of the week.
-
-
-.. data:: ABDAY_1 ... ABDAY_7
-
-   Return abbreviated name of the n-th day of the week.
-
-
-.. data:: MON_1 ... MON_12
-
-   Return name of the n-th month.
-
-
-.. data:: ABMON_1 ... ABMON_12
-
-   Return abbreviated name of the n-th month.
-
-
-.. data:: RADIXCHAR
-
-   Return radix character (decimal dot, decimal comma, etc.)
-
-
-.. data:: THOUSEP
-
-   Return separator character for thousands (groups of three digits).
-
-
-.. data:: YESEXPR
-
-   Return a regular expression that can be used with the regex function to
-   recognize a positive response to a yes/no question.
-
-   .. note::
-
-      The expression is in the syntax suitable for the :cfunc:`regex` function from
-      the C library, which might differ from the syntax used in :mod:`re`.
-
-
-.. data:: NOEXPR
-
-   Return a regular expression that can be used with the regex(3) function to
-   recognize a negative response to a yes/no question.
-
-
-.. data:: CRNCYSTR
-
-   Return the currency symbol, preceded by "-" if the symbol should appear before
-   the value, "+" if the symbol should appear after the value, or "." if the symbol
-   should replace the radix character.
-
-
-.. data:: ERA
-
-   The return value represents the era used in the current locale.
-
-   Most locales do not define this value.  An example of a locale which does define
-   this value is the Japanese one.  In Japan, the traditional representation of
-   dates includes the name of the era corresponding to the then-emperor's reign.
-
-   Normally it should not be necessary to use this value directly. Specifying the
-   ``E`` modifier in their format strings causes the :func:`strftime` function to
-   use this information.  The format of the returned string is not specified, and
-   therefore you should not assume knowledge of it on different systems.
-
-
-.. data:: ERA_YEAR
-
-   The return value gives the year in the relevant era of the locale.
-
-
-.. data:: ERA_D_T_FMT
-
-   This return value can be used as a format string for :func:`strftime` to
-   represent dates and times in a locale-specific era-based way.
-
-
-.. data:: ERA_D_FMT
-
-   This return value can be used as a format string for :func:`strftime` to
-   represent time in a locale-specific era-based way.
-
-
-.. data:: ALT_DIGITS
-
-   The return value is a representation of up to 100 values used to represent the
-   values 0 to 99.
 
 Example::
 
    >>> import locale
    >>> loc = locale.getlocale() # get current locale
-   >>> locale.setlocale(locale.LC_ALL, 'de_DE') # use German locale; name might vary with platform
+   # use German locale; name might vary with platform
+   >>> locale.setlocale(locale.LC_ALL, 'de_DE')
    >>> locale.strcoll('f\xe4n', 'foo') # compare a string containing an umlaut
    >>> locale.setlocale(locale.LC_ALL, '') # use user's preferred locale
    >>> locale.setlocale(locale.LC_ALL, 'C') # use default (C) locale
index 6a903eec3c09db7bde91ef17ef659f59b4be34c7..4cca466406d62f1a9e0a296bb01e9043a4309b01 100644 (file)
@@ -374,7 +374,9 @@ The :mod:`multiprocessing` package mostly replicates the API of the
 
       Note that a daemonic process is not allowed to create child processes.
       Otherwise a daemonic process would leave its children orphaned if it gets
-      terminated when its parent process exits.
+      terminated when its parent process exits. Additionally, these are **not**
+      Unix daemons or services, they are normal processes that will be
+      terminated (and not joined) if non-dameonic processes have exited.
 
    In addition to the  :class:`Threading.Thread` API, :class:`Process` objects
    also support the following attributes and methods:
@@ -1700,7 +1702,7 @@ authentication* using the :mod:`hmac` module.
    generally be omitted since it can usually be inferred from the format of
    *address*. (See :ref:`multiprocessing-address-formats`)
 
-   If *authentication* is ``True`` or *authkey* is a string then digest
+   If *authenticate* is ``True`` or *authkey* is a string then digest
    authentication is used.  The key used for authentication will be either
    *authkey* or ``current_process().authkey)`` if *authkey* is ``None``.
    If authentication fails then :exc:`AuthenticationError` is raised.  See
@@ -1742,7 +1744,7 @@ authentication* using the :mod:`hmac` module.
 
    If *authkey* is ``None`` and *authenticate* is ``True`` then
    ``current_process().authkey`` is used as the authentication key.  If
-   *authkey* is ``None`` and *authentication* is ``False`` then no
+   *authkey* is ``None`` and *authenticate* is ``False`` then no
    authentication is done.  If authentication fails then
    :exc:`AuthenticationError` is raised.  See :ref:`multiprocessing-auth-keys`.
 
index b8e09aa35895a6f4b7ec4a67419109c363d02490..5ac11c3c4e6b85bfd1007fc51306f73600ab14f3 100644 (file)
@@ -645,8 +645,8 @@ option involved in the error; be sure to do the same when calling
 :func:`OptionParser.error` from your application code.
 
 If :mod:`optparse`'s default error-handling behaviour does not suit your needs,
-you'll need to subclass OptionParser and override its :meth:`exit` and/or
-:meth:`error` methods.
+you'll need to subclass OptionParser and override its :meth:`~OptionParser.exit`
+and/or :meth:`~OptionParser.error` methods.
 
 
 .. _optparse-putting-it-all-together:
index b07e3bdd84fd13c0a1a6d209d791e8ad61bb3996..ea1619040d39e336c0c59ddf6fab91e1b27336ec 100644 (file)
@@ -1,6 +1,5 @@
-
-:mod:`pickletools` --- Tools for pickle developers.
-===================================================
+:mod:`pickletools` --- Tools for pickle developers
+==================================================
 
 .. module:: pickletools
    :synopsis: Contains extensive comments about the pickle protocols and pickle-machine
index 9900278022b492036b712fa82d7cacc3a488422e..98b7972d9bd8f38b637c948954159e2972d10a55 100644 (file)
@@ -1,6 +1,5 @@
-
-:mod:`platform` ---  Access to underlying platform's identifying data.
-======================================================================
+:mod:`platform` ---  Access to underlying platform's identifying data
+=====================================================================
 
 .. module:: platform
    :synopsis: Retrieves as much platform identifying data as possible.
index deebda7afc5a2e694007dcdc62b89cb8cbbbca19..57f96a9b3d4068bb6ba7655ab475db8a7c3f8df3 100644 (file)
@@ -588,10 +588,18 @@ Implementations that do not obey this property are deemed broken.  (This
 constraint was added in Python 2.3; in Python 2.2, various iterators are broken
 according to this rule.)
 
+
+.. _generator-types:
+
+Generator Types
+---------------
+
 Python's :term:`generator`\s provide a convenient way to implement the iterator
 protocol.  If a container object's :meth:`__iter__` method is implemented as a
 generator, it will automatically return an iterator object (technically, a
-generator object) supplying the :meth:`__iter__` and :meth:`next` methods.
+generator object) supplying the :meth:`__iter__` and :meth:`next` methods.  More
+information about generators can be found in :ref:`the documentation for the
+yield expression <yieldexpr>`.
 
 
 .. _typesseq:
index 08b4103ac9b36fbe886d6aad682e1b4bc20d4ba0..50fe0626fc3f036253d37f1969836a60d6efea7a 100644 (file)
@@ -825,14 +825,15 @@ not be removed until Python 3.0.  The functions defined in this module are:
    Return a copy of *s*, but with lower case letters converted to upper case.
 
 
-.. function:: ljust(s, width)
-              rjust(s, width)
-              center(s, width)
+.. function:: ljust(s, width[, fillchar])
+              rjust(s, width[, fillchar])
+              center(s, width[, fillchar])
 
    These functions respectively left-justify, right-justify and center a string in
    a field of given width.  They return a string that is at least *width*
-   characters wide, created by padding the string *s* with spaces until the given
-   width on the right, left or both sides.  The string is never truncated.
+   characters wide, created by padding the string *s* with the character *fillchar*
+   (default is a space) until the given width on the right, left or both sides.
+   The string is never truncated.
 
 
 .. function:: zfill(s, width)
index c6bd07bea397fe2126279d65563bee284d88c0a4..bc37d330e5230c8bfd0bf0710c626e946c4d0401 100644 (file)
@@ -73,7 +73,11 @@ This module defines one class called :class:`Popen`:
    needed: Usually, the program to execute is defined by the *args* argument. If
    ``shell=True``, the *executable* argument specifies which shell to use. On Unix,
    the default shell is :file:`/bin/sh`.  On Windows, the default shell is
-   specified by the :envvar:`COMSPEC` environment variable.
+   specified by the :envvar:`COMSPEC` environment variable. The only reason you
+   would need to specify ``shell=True`` on Windows is where the command you
+   wish to execute is actually built in to the shell, eg ``dir``, ``copy``.
+   You don't need ``shell=True`` to run a batch file, nor to run a console-based
+   executable.
 
    *stdin*, *stdout* and *stderr* specify the executed programs' standard input,
    standard output and standard error file handles, respectively.  Valid values
index 9ea3f01b40799dc64e29fc5045a4b26ba0e25c61..9aafd4e13cb9209d97188d92caa25f7682c9f882 100644 (file)
@@ -144,6 +144,10 @@ Examining Symbol Tables
 
       Return ``True`` if the symbol is global.
 
+   .. method:: is_declared_global()
+
+      Return ``True`` if the symbol is declared global with a global statement.
+
    .. method:: is_local()
 
       Return ``True`` if the symbol is local to its block.
index c545b97148391c41190f9e5036d31aabf97e28ff..4f930b354fee688bc69244705de3ad5c9955f1fb 100644 (file)
@@ -26,8 +26,9 @@ The module defines the following public class:
 
    The constructor takes a statement to be timed, an additional statement used for
    setup, and a timer function.  Both statements default to ``'pass'``; the timer
-   function is platform-dependent (see the module doc string).  The statements may
-   contain newlines, as long as they don't contain multi-line string literals.
+   function is platform-dependent (see the module doc string).  *stmt* and *setup*
+   may also contain multiple statements separated by ``;`` or newlines, as long as
+   they don't contain multi-line string literals.
 
    To measure the execution time of the first statement, use the :meth:`timeit`
    method.  The :meth:`repeat` method is a convenience to call :meth:`timeit`
index 81e74528305b8f22df5c0413e0e67f2b03d41aa5..77fe5eed2ed5fce9b70653ac9581ad38f9e041a1 100644 (file)
@@ -279,6 +279,8 @@ Available Functions
    be a string and *category* a subclass of :exc:`Warning`. :func:`warnpy3k`
    is using :exc:`DeprecationWarning` as default warning class.
 
+   .. versionadded:: 2.6
+
 
 .. function:: showwarning(message, category, filename, lineno[, file[, line]])
 
index fa73ea2daf86eadcc3a0c5a8ec346f854deeb563..88b9b068c416c460ba5405268dcd3fed703bb4a5 100644 (file)
@@ -319,7 +319,7 @@ Miscellaneous options
       warning is triggered repeatedly for the same source line, such as inside a
       loop).
    ``module``
-      Print each warning only only the first time it occurs in each module.
+      Print each warning only the first time it occurs in each module.
    ``once``
       Print each warning only the first time it occurs in the program.
    ``error``
index 14f283d92d75fbb196d185c3f04a76cc91cd7e65..127b782c1f4bd48e9a124e7d7436eb0e63f1bf20 100644 (file)
@@ -16184,7 +16184,7 @@ people seemed not to have picked it up.  There's a Python script that
 fixes old code: demo/scripts/classfix.py.
 
 * There's a new reserved word: "access".  The syntax and semantics are
-still subject of of research and debate (as well as undocumented), but
+still subject of research and debate (as well as undocumented), but
 the parser knows about the keyword so you must not use it as a
 variable, function, or attribute name.
 
@@ -16434,7 +16434,7 @@ you could get away with the following:
        (a) define a function of one argument and call it with any
            number of arguments; if the actual argument count wasn't
            one, the function would receive a tuple containing the
-           arguments arguments (an empty tuple if there were none).
+           arguments (an empty tuple if there were none).
 
        (b) define a function of two arguments, and call it with more
            than two arguments; if there were more than two arguments,
@@ -16756,7 +16756,7 @@ Changes to the source code that affect C extension writers
 ----------------------------------------------------------
 
 The function strdup() no longer exists (it was used only in one places
-and is somewhat of a a portability problem sice some systems have the
+and is somewhat of a portability problem since some systems have the
 same function in their C library.
 
 The functions NEW() and RENEW() allocate one spare byte to guard
index d265ef135d8bfb20289d9b0c483d82c8d5b7542c..53d172113b9cd8d33e82abbaa14d2331c6b3b3e6 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -3576,7 +3576,7 @@ Library
 - Bug #1565661: in webbrowser, split() the command for the default
   GNOME browser in case it is a command with args.
 
-- Made the error message for time.strptime when the data data and
+- Made the error message for time.strptime when the data and
   format do match be more clear.
 
 - Fix a bug in traceback.format_exception_only() that led to an error
index 60ce9a8241ddc4e7cb993b9839a130fceb13758f..1b94f141e9f3b0bb021d9455e517f6ce8e0fdb23 100644 (file)
@@ -37,6 +37,6 @@ options.
 Then bang on it until it executes very simple Python statements.
 
 Now bang on it some more.  At some point you'll want to use the os
-module; this is the time to start thinking about what to to with the
+module; this is the time to start thinking about what to do with the
 posix module.  It's okay to simply #ifdef out those functions that
 cause problems; the remaining ones will be quite useful.
index df69f244f68d5117799e13450f575cfa314fb7cf..98e3399ff9d0352e71c4a5f420d9c65f1df4cab9 100644 (file)
@@ -1145,7 +1145,7 @@ Exception>
 Standard methods & operators redefinition in classes
 
 Standard methods & operators map to special '__methods__' and thus may be
- redefined (mostly in in user-defined classes), e.g.:
+ redefined (mostly in user-defined classes), e.g.:
     class x:
          def __init__(self, v): self.value = v
          def __add__(self, r): return self.value + r
index b4f6c702aade973ad7a9c3f6abc285c4d9f4ba2d..5b90e4c277caae5104e69a165d68bf61f139552f 100644 (file)
@@ -41,7 +41,7 @@ Permissions History
 - Heiko Weinen was given SVN access on 29 April 2008 by MvL,
   for GSoC contributions.
 
-- Jesus Cea was was given SVN access on 24 April 2008 by MvL,
+- Jesus Cea was given SVN access on 24 April 2008 by MvL,
   for maintenance of bsddb.
 
 - Guilherme Polo was given SVN access on 24 April 2008 by MvL,
index 1db77eaac5ad48d533a64d539a3b20b989730bd4..fd9ed45760496fc0a8caf3b87766c6b84655a6e2 100644 (file)
@@ -204,7 +204,7 @@ to print a warning each time it occurs (this may generate many
 messages if a warning is triggered repeatedly for the same source
 line, such as inside a loop);
 .B module
-to print each warning only only the first time it occurs in each
+to print each warning only the first time it occurs in each
 module;
 .B once
 to print each warning only the first time it occurs in the program; or