[Python-checkins] r74408 - in python/branches/release31-maint: Doc/c-api/import.rst Doc/library/array.rst Doc/library/imp.rst Doc/library/locale.rst Lib/subprocess.py

georg.brandl python-checkins at python.org
Thu Aug 13 14:13:42 CEST 2009


Author: georg.brandl
Date: Thu Aug 13 14:13:42 2009
New Revision: 74408

Log:
Recorded merge of revisions 74057 via svnmerge from 
svn+ssh://svn.python.org/python/branches/py3k

(Only selected revisions.)

................
  r74057 | alexandre.vassalotti | 2009-07-17 12:42:05 +0200 (Fr, 17 Jul 2009) | 54 lines
  
  Merged revisions 73930-73932,73937-73939,73945,73951,73954,73962-73963,73970 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r73930 | amaury.forgeotdarc | 2009-07-10 12:47:42 -0400 (Fri, 10 Jul 2009) | 2 lines
    
    #6447: typo in subprocess docstring
  ........
    r73937 | georg.brandl | 2009-07-11 06:12:36 -0400 (Sat, 11 Jul 2009) | 1 line
    
    Fix style.
  ........
    r73938 | georg.brandl | 2009-07-11 06:14:54 -0400 (Sat, 11 Jul 2009) | 1 line
    
    #6446: fix import_spam() function to use correct error and reference handling.
  ........
    r73939 | georg.brandl | 2009-07-11 06:18:10 -0400 (Sat, 11 Jul 2009) | 1 line
    
    #6448: clarify docs for find_module().
  ........
    r73945 | georg.brandl | 2009-07-11 06:51:31 -0400 (Sat, 11 Jul 2009) | 1 line
    
    #6456: clarify the meaning of constants used as arguments to nl_langinfo().
  ........
    r73951 | georg.brandl | 2009-07-11 10:23:38 -0400 (Sat, 11 Jul 2009) | 2 lines
    
    array.array is actually a class.
................


Modified:
   python/branches/release31-maint/   (props changed)
   python/branches/release31-maint/Doc/c-api/import.rst
   python/branches/release31-maint/Doc/library/array.rst
   python/branches/release31-maint/Doc/library/imp.rst
   python/branches/release31-maint/Doc/library/locale.rst
   python/branches/release31-maint/Lib/subprocess.py

Modified: python/branches/release31-maint/Doc/c-api/import.rst
==============================================================================
--- python/branches/release31-maint/Doc/c-api/import.rst	(original)
+++ python/branches/release31-maint/Doc/c-api/import.rst	Thu Aug 13 14:13:42 2009
@@ -25,6 +25,8 @@
    imported module, or *NULL* with an exception set on failure.  A failing
    import of a module doesn't leave the module in :data:`sys.modules`.
 
+   This function always uses absolute imports.
+
 
 .. cfunction:: PyObject* PyImport_ImportModuleNoBlock(const char *name)
 
@@ -75,6 +77,8 @@
    current globals.  This means that the import is done using whatever import
    hooks are installed in the current environment.
 
+   This function always uses absolute imports.
+
 
 .. cfunction:: PyObject* PyImport_ReloadModule(PyObject *m)
 

Modified: python/branches/release31-maint/Doc/library/array.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/array.rst	(original)
+++ python/branches/release31-maint/Doc/library/array.rst	Thu Aug 13 14:13:42 2009
@@ -52,9 +52,9 @@
 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, object
    supporting the buffer interface, or iterable over elements of the
    appropriate type.
@@ -67,7 +67,7 @@
 
 .. data:: ArrayType
 
-   Obsolete alias for :func:`array`.
+   Obsolete alias for :class:`array`.
 
 .. data:: typecodes
 
@@ -81,7 +81,6 @@
 
 The following data items and methods are also supported:
 
-
 .. attribute:: array.typecode
 
    The typecode character used to create the array.

Modified: python/branches/release31-maint/Doc/library/imp.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/imp.rst	(original)
+++ python/branches/release31-maint/Doc/library/imp.rst	Thu Aug 13 14:13:42 2009
@@ -33,16 +33,17 @@
 
 .. 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)``:

Modified: python/branches/release31-maint/Doc/library/locale.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/locale.rst	(original)
+++ python/branches/release31-maint/Doc/library/locale.rst	Thu Aug 13 14:13:42 2009
@@ -144,13 +144,127 @@
 
 .. 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.
 
-.. function:: getdefaultlocale(envvars=('LC_ALL', 'LC_CTYPE', 'LANG', 'LANGUAGE'))
+   .. 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])
 
    Tries to determine the default locale settings and returns them as a tuple of
    the form ``(language code, encoding)``.
@@ -338,140 +452,13 @@
    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

Modified: python/branches/release31-maint/Lib/subprocess.py
==============================================================================
--- python/branches/release31-maint/Lib/subprocess.py	(original)
+++ python/branches/release31-maint/Lib/subprocess.py	Thu Aug 13 14:13:42 2009
@@ -723,7 +723,7 @@
         # Windows methods
         #
         def _get_handles(self, stdin, stdout, stderr):
-            """Construct and return tupel with IO objects:
+            """Construct and return tuple with IO objects:
             p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite
             """
             if stdin is None and stdout is None and stderr is None:
@@ -958,7 +958,7 @@
         # POSIX methods
         #
         def _get_handles(self, stdin, stdout, stderr):
-            """Construct and return tupel with IO objects:
+            """Construct and return tuple with IO objects:
             p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite
             """
             p2cread, p2cwrite = None, None


More information about the Python-checkins mailing list