# HG changeset patch # User Éric Araujo # Date 1294657856 -3600 # Branch py3k # Node ID c966a93d26e9f8a29864e2928874e66d6726df7d # Parent fb333b327729d5b0e32165919b06894725cd83e8 Some more typos and tweaks. diff --git a/Doc/whatsnew/3.2.rst b/Doc/whatsnew/3.2.rst --- a/Doc/whatsnew/3.2.rst +++ b/Doc/whatsnew/3.2.rst @@ -49,7 +49,7 @@ This article explains the new features in Python 3.2 as compared to 3.1. It focuses on a few highlights and gives a few examples. For full details, see the -:source:`Misc/NEWS ` file. +:source:`Misc/NEWS` file. .. seealso:: @@ -393,8 +393,8 @@ points: bytes to native strings using ``h.encode('utf-8').decode('latin-1')``. * Values yielded by an application or sent using the :meth:`write` method - must be byte strings. The :func:`start_response` function and environ - must use native strings. The two cannot be mixed. + must be byte strings. The :func:`start_response` function and environ + must use native strings. The two cannot be mixed. For server implementers writing CGI-to-WSGI pathways or other CGI-style protocols, the users must to be able access the environment using native strings @@ -427,7 +427,7 @@ Some smaller changes made to the core Py (Suggested by Mark Dickinson and implemented by Eric Smith in :issue:`7094`.) -* The interpreter can now be started with a quiet option, ``-q``, to suppress +* The interpreter can now be started with a quiet option, ``-q``, to prevent the copyright and version information from being displayed in the interactive mode. The option can be introspected using the :attr:`sys.flags` attribute:: @@ -437,7 +437,7 @@ Some smaller changes made to the core Py optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=1) - (Contributed by Marcin Wojdyr in issue:`1772833`). + (Contributed by Marcin Wojdyr in :issue:`1772833`). * The :func:`hasattr` function works by calling :func:`getattr` and detecting whether an exception is raised. This technique allows it to detect methods @@ -537,7 +537,7 @@ Some smaller changes made to the core Py (Added by Antoine Pitrou and Georg Brandl in :issue:`10093` and :issue:`477863`.) -* :class:`range` objects now support *index* and *count* methods. This is part +* :class:`range` objects now support *index* and *count* methods. This is part of an effort to make more objects fully implement the :class:`collections.Sequence` :term:`abstract base class`. As a result, the language will have a more uniform API. In addition, :class:`range` objects @@ -922,7 +922,7 @@ Trying to fulfill two roles at once plac Context managers normally have the flexibility to return an argument usable by the :keyword:`with`-statement, but there is no parallel for function decorators. -In the above example, there is not a clean way for the *track_entry_and_exit* +In the above example, there is no clean way for the *track_entry_and_exit* context manager to return a logging instance for use in the body of enclosed statements. @@ -1373,7 +1373,7 @@ The :mod:`pdb` debugger module gained a * A :file:`.pdbrc` script file can contain ``continue`` and ``next`` commands that continue debugging. * The :class:`Pdb` class constructor now accepts a *nosigint* argument. -* New commands: ``l(list)``, ``ll(long list`` and ``source`` for +* New commands: ``l(list)``, ``ll(long list)`` and ``source`` for listing source code. * New commands: ``display`` and ``undisplay`` for showing or hiding the value of an expression if it has changed. @@ -1499,8 +1499,8 @@ Multi-threading * Regular and recursive lock acquisitions can now be interrupted by signals on platforms using pthreads. This means that Python programs that deadlock while acquiring locks can be successfully killed by repeatedly sending SIGINT to the - process (by pressing :kbd:`Ctrl+C` in most shells). - (Contributed by Reid Kleckner; :issue:`8844`.) + process (by pressing :kbd:`Ctrl+C` in most shells). (Contributed by Reid + Kleckner; :issue:`8844`.) Optimizations @@ -1569,7 +1569,7 @@ A number of small performance enhancemen There were several other minor optimizations. Set differencing now runs faster when one operand is much larger than the other (patch by Andress Bennetts in :issue:`8685`). The :meth:`array.repeat` method has a faster implementation -(:issue:`1569291` by Alexander Belopolsky). The :class:`BaseHTTPRequestHandler` +(:issue:`1569291` by Alexander Belopolsky). The :class:`BaseHTTPRequestHandler` has more efficient buffering (:issue:`3709` by Andrew Schaaf). The multi-argument form of :func:`operator.attrgetter` function now runs slightly faster (:issue:`10160` by Christos Georgiou). And :class:`ConfigParser` loads @@ -1621,7 +1621,7 @@ By default, tarfile uses ``'utf-8'`` enc ``'mbcs'``), and the ``'surrogateescape'`` error handler on all operating systems. -Also, support was added for *cp720* Arabic DOS encoding (:issue:`1616979`). +Also, support was added for the *cp720* Arabic DOS encoding (:issue:`1616979`). Documentation @@ -1637,7 +1637,7 @@ memory jog without having to read all of In some cases, the pure Python source code can be helpful adjunct to the docs, so now some modules feature quick links to the latest version of the source code. For example, the :mod:`functools` module documentation has a quick link -at the top labeled: *Source code* :source:`Lib/functools.py`. +at the top labeled: **Source code** :source:`Lib/functools.py`. The docs now contain more examples and recipes. In particular, :mod:`re` module has an extensive section, :ref:`re-examples`. Likewise, the :mod:`itertools` @@ -1783,7 +1783,7 @@ require changes to your code: * :class:`bytearray` objects can no longer be used as filenames; instead, they should be converted to :class:`bytes`. -* PyArg_Parse*() functions: +* ``PyArg_Parse*()`` functions: * "t#" format has been removed: use "s#" or "s*" instead * "w" and "w#" formats has been removed: use "w*" instead @@ -1802,7 +1802,7 @@ require changes to your code: ``random.seed(s, version=1)``. * The previously deprecated :func:`string.maketrans` function has been removed - in favor of the static method :meth:`bytes.maketrans` and + in favor of the static methods :meth:`bytes.maketrans` and :meth:`bytearray.maketrans`. This change solves the confusion around which types were supported by the :mod:`string` module. Now, :class:`str`, :class:`bytes`, and :class:`bytearray` each have their own **maketrans** and @@ -1837,7 +1837,7 @@ require changes to your code: (Discovered by David Beazley and fixed by Victor Stinner; :issue:`10783`.) * The :class:`xml.etree.ElementTree` class now raises an - :exc:`xml.etree.ElementTree.ParseError` when a parse fails. Previously it + :exc:`xml.etree.ElementTree.ParseError` when a parse fails. Previously it raised a :exc:`xml.parsers.expat.ExpatError`. * The new, longer :func:`str` value on floats may break doctests which rely on