[Python-checkins] r87887 - in python/branches/release31-maint: Doc/ACKS.txt Doc/glossary.rst Doc/library/csv.rst Doc/library/email.charset.rst Doc/library/email.header.rst Doc/library/inspect.rst Doc/library/operator.rst Doc/library/string.rst Doc/reference/compound_stmts.rst Doc/reference/executionmodel.rst

georg.brandl python-checkins at python.org
Sun Jan 9 09:01:46 CET 2011


Author: georg.brandl
Date: Sun Jan  9 09:01:46 2011
New Revision: 87887

Log:
Merged revisions 87789-87790 via svnmerge from 
svn+ssh://svn.python.org/python/branches/py3k

........
  r87789 | georg.brandl | 2011-01-06 10:23:56 +0100 (Do, 06 Jan 2011) | 1 line
  
  Fix various issues (mostly Python 2 relics) found by Jacques Ducasse.
........
  r87790 | georg.brandl | 2011-01-06 10:25:27 +0100 (Do, 06 Jan 2011) | 1 line
  
  Add acks where acks are due.
........


Modified:
   python/branches/release31-maint/   (props changed)
   python/branches/release31-maint/Doc/ACKS.txt
   python/branches/release31-maint/Doc/glossary.rst
   python/branches/release31-maint/Doc/library/csv.rst
   python/branches/release31-maint/Doc/library/email.charset.rst
   python/branches/release31-maint/Doc/library/email.header.rst
   python/branches/release31-maint/Doc/library/inspect.rst
   python/branches/release31-maint/Doc/library/operator.rst
   python/branches/release31-maint/Doc/library/string.rst
   python/branches/release31-maint/Doc/reference/compound_stmts.rst
   python/branches/release31-maint/Doc/reference/executionmodel.rst

Modified: python/branches/release31-maint/Doc/ACKS.txt
==============================================================================
--- python/branches/release31-maint/Doc/ACKS.txt	(original)
+++ python/branches/release31-maint/Doc/ACKS.txt	Sun Jan  9 09:01:46 2011
@@ -47,6 +47,7 @@
    * L. Peter Deutsch
    * Robert Donohue
    * Fred L. Drake, Jr.
+   * Jacques Ducasse
    * Josip Dzolonga
    * Jeff Epler
    * Michael Ernst

Modified: python/branches/release31-maint/Doc/glossary.rst
==============================================================================
--- python/branches/release31-maint/Doc/glossary.rst	(original)
+++ python/branches/release31-maint/Doc/glossary.rst	Sun Jan  9 09:01:46 2011
@@ -344,12 +344,12 @@
 
    iterator
       An object representing a stream of data.  Repeated calls to the iterator's
-      :meth:`__next__` (or passing it to the built-in function :func:`next`)
-      method return successive items in the stream.  When no more data are
-      available a :exc:`StopIteration` exception is raised instead.  At this
+      :meth:`__next__` method (or passing it to the built-in function
+      :func:`next`) return successive items in the stream.  When no more data
+      are available a :exc:`StopIteration` exception is raised instead.  At this
       point, the iterator object is exhausted and any further calls to its
-      :meth:`next` method just raise :exc:`StopIteration` again.  Iterators are
-      required to have an :meth:`__iter__` method that returns the iterator
+      :meth:`__next__` method just raise :exc:`StopIteration` again.  Iterators
+      are required to have an :meth:`__iter__` method that returns the iterator
       object itself so every iterator is also iterable and may be used in most
       places where other iterables are accepted.  One notable exception is code
       which attempts multiple iteration passes.  A container object (such as a

Modified: python/branches/release31-maint/Doc/library/csv.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/csv.rst	(original)
+++ python/branches/release31-maint/Doc/library/csv.rst	Sun Jan  9 09:01:46 2011
@@ -50,7 +50,7 @@
 
    Return a reader object which will iterate over lines in the given *csvfile*.
    *csvfile* can be any object which supports the :term:`iterator` protocol and returns a
-   string each time its :meth:`!next` method is called --- :term:`file objects
+   string each time its :meth:`!__next__` method is called --- :term:`file objects
    <file object>` and list objects are both suitable.   If *csvfile* is a file object,
    it should be opened with ``newline=''``. [#]_  An optional
    *dialect* parameter can be given which is used to define a set of parameters

Modified: python/branches/release31-maint/Doc/library/email.charset.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/email.charset.rst	(original)
+++ python/branches/release31-maint/Doc/library/email.charset.rst	Sun Jan  9 09:01:46 2011
@@ -142,12 +142,6 @@
       it is *input_charset*.
 
 
-   .. method:: encoded_header_len()
-
-      Return the length of the encoded header string, properly calculating for
-      quoted-printable or base64 encoding.
-
-
    .. method:: header_encode(string)
 
       Header-encode the string *string*.
@@ -156,6 +150,16 @@
       *header_encoding* attribute.
 
 
+   .. method:: header_encode_lines(string, maxlengths)
+
+      Header-encode a *string* by converting it first to bytes.
+
+      This is similar to :meth:`header_encode` except that the string is fit
+      into maximum line lengths as given by the argument *maxlengths*, which
+      must be an iterator: each element returned from this iterator will provide
+      the next maximum line length.
+
+
    .. method:: body_encode(string)
 
       Body-encode the string *string*.

Modified: python/branches/release31-maint/Doc/library/email.header.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/email.header.rst	(original)
+++ python/branches/release31-maint/Doc/library/email.header.rst	Sun Jan  9 09:01:46 2011
@@ -121,14 +121,10 @@
 
    .. method:: __str__()
 
-      A synonym for :meth:`Header.encode`.  Useful for ``str(aHeader)``.
-
-
-   .. method:: __unicode__()
-
       A helper for :class:`str`'s :func:`encode` method.  Returns the header as
       a Unicode string.
 
+
    .. method:: __eq__(other)
 
       This method allows you to compare two :class:`Header` instances for

Modified: python/branches/release31-maint/Doc/library/inspect.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/inspect.rst	(original)
+++ python/branches/release31-maint/Doc/library/inspect.rst	Sun Jan  9 09:01:46 2011
@@ -176,17 +176,16 @@
 
 .. function:: getmoduleinfo(path)
 
-   Returns a :term:`named tuple` ``ModuleInfo(name, suffix, mode,
-   module_type)`` of values that describe how Python will interpret the file
-   identified by *path* if it is a module, or ``None`` if it would not be
-   identified as a module.  The return tuple is ``(name, suffix, mode, mtype)``,
-   where *name* is the name of the module without the name of any enclosing
-   package, *suffix* is the trailing part of the file name (which may not be a
-   dot-delimited extension), *mode* is the :func:`open` mode that would be used
-   (``'r'`` or ``'rb'``), and *mtype* is an integer giving the type of the
-   module.  *mtype* will have a value which can be compared to the constants
-   defined in the :mod:`imp` module; see the documentation for that module for
-   more information on module types.
+   Returns a :term:`named tuple` ``ModuleInfo(name, suffix, mode, module_type)``
+   of values that describe how Python will interpret the file identified by
+   *path* if it is a module, or ``None`` if it would not be identified as a
+   module.  In that tuple, *name* is the name of the module without the name of
+   any enclosing package, *suffix* is the trailing part of the file name (which
+   may not be a dot-delimited extension), *mode* is the :func:`open` mode that
+   would be used (``'r'`` or ``'rb'``), and *module_type* is an integer giving
+   the type of the module.  *module_type* will have a value which can be
+   compared to the constants defined in the :mod:`imp` module; see the
+   documentation for that module for more information on module types.
 
 
 .. function:: getmodulename(path)
@@ -391,12 +390,12 @@
 .. function:: getargspec(func)
 
    Get the names and default values of a Python function's arguments. A
-   :term:`named tuple` ``ArgSpec(args, varargs, keywords,
-   defaults)`` is returned. *args* is a list of
-   the argument names. *varargs* and *varkw* are the names of the ``*`` and
-   ``**`` arguments or ``None``. *defaults* is a tuple of default argument
-   values or None if there are no default arguments; if this tuple has *n*
-   elements, they correspond to the last *n* elements listed in *args*.
+   :term:`named tuple` ``ArgSpec(args, varargs, keywords, defaults)`` is
+   returned. *args* is a list of the argument names. *varargs* and *keywords*
+   are the names of the ``*`` and ``**`` arguments or ``None``. *defaults* is a
+   tuple of default argument values or None if there are no default arguments;
+   if this tuple has *n* elements, they correspond to the last *n* elements
+   listed in *args*.
 
    .. deprecated:: 3.0
       Use :func:`getfullargspec` instead, which provides information about
@@ -425,8 +424,8 @@
 
    Get information about arguments passed into a particular frame.  A
    :term:`named tuple` ``ArgInfo(args, varargs, keywords, locals)`` is
-   returned. *args* is a list of the argument names.  *varargs* and *varkw* are
-   the names of the ``*`` and ``**`` arguments or ``None``.  *locals* is the
+   returned. *args* is a list of the argument names.  *varargs* and *keywords*
+   are the names of the ``*`` and ``**`` arguments or ``None``.  *locals* is the
    locals dictionary of the given frame.
 
 

Modified: python/branches/release31-maint/Doc/library/operator.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/operator.rst	(original)
+++ python/branches/release31-maint/Doc/library/operator.rst	Sun Jan  9 09:01:46 2011
@@ -19,8 +19,7 @@
 trailing ``__`` are also provided for convenience.
 
 The functions fall into categories that perform object comparisons, logical
-operations, mathematical operations, sequence operations, and abstract type
-tests.
+operations, mathematical operations and sequence operations.
 
 The object comparison functions are useful for all objects, and are named after
 the rich comparison operators they support:

Modified: python/branches/release31-maint/Doc/library/string.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/string.rst	(original)
+++ python/branches/release31-maint/Doc/library/string.rst	Sun Jan  9 09:01:46 2011
@@ -5,16 +5,11 @@
    :synopsis: Common string operations.
 
 
-.. index:: module: re
+.. seealso::
 
-The :mod:`string` module contains a number of useful constants and classes
-for string formatting.  In addition, Python's built-in string classes
-support the sequence type methods described in the :ref:`typesseq`
-section, and also the string-specific methods described in the
-:ref:`string-methods` section.  To output formatted strings, see the
-:ref:`string-formatting` section.  Also, see the :mod:`re` module for
-string functions based on regular expressions.
+   :ref:`typesseq`
 
+   :ref:`string-methods`
 
 String constants
 ----------------

Modified: python/branches/release31-maint/Doc/reference/compound_stmts.rst
==============================================================================
--- python/branches/release31-maint/Doc/reference/compound_stmts.rst	(original)
+++ python/branches/release31-maint/Doc/reference/compound_stmts.rst	Sun Jan  9 09:01:46 2011
@@ -285,12 +285,11 @@
 
 Before an except clause's suite is executed, details about the exception are
 stored in the :mod:`sys` module and can be access via :func:`sys.exc_info`.
-:func:`sys.exc_info` returns a 3-tuple consisting of: ``exc_type``, the
-exception class; ``exc_value``, the exception instance; ``exc_traceback``, a
-traceback object (see section :ref:`types`) identifying the point in the program
-where the exception occurred. :func:`sys.exc_info` values are restored to their
-previous values (before the call) when returning from a function that handled an
-exception.
+:func:`sys.exc_info` returns a 3-tuple consisting of the exception class, the
+exception instance and a traceback object (see section :ref:`types`) identifying
+the point in the program where the exception occurred.  :func:`sys.exc_info`
+values are restored to their previous values (before the call) when returning
+from a function that handled an exception.
 
 .. index::
    keyword: else

Modified: python/branches/release31-maint/Doc/reference/executionmodel.rst
==============================================================================
--- python/branches/release31-maint/Doc/reference/executionmodel.rst	(original)
+++ python/branches/release31-maint/Doc/reference/executionmodel.rst	Sun Jan  9 09:01:46 2011
@@ -141,9 +141,9 @@
 The namespace for a module is automatically created the first time a module is
 imported.  The main module for a script is always called :mod:`__main__`.
 
-The global statement has the same scope as a name binding operation in the same
-block.  If the nearest enclosing scope for a free variable contains a global
-statement, the free variable is treated as a global.
+The :keyword:`global` statement has the same scope as a name binding operation
+in the same block.  If the nearest enclosing scope for a free variable contains
+a global statement, the free variable is treated as a global.
 
 A class definition is an executable statement that may use and define names.
 These references follow the normal rules for name resolution.  The namespace of


More information about the Python-checkins mailing list