# HG changeset patch # User Éric Araujo # Date 1294657921 -3600 # Branch py3k # Node ID edcee954a18dda16530668972fdce692066755b0 # Parent 76c63132bfb3a240252f2eab20577f94dc8b770d Use hyphens in adjectives; slightly tweak wording in some places. 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 @@ -368,7 +368,7 @@ PEP 3333: Python Web Server Gateway Inte This informational PEP clarifies how bytes/text issues are to be handled by the WGSI protocol. The challenge is that string handling in Python 3 is most conveniently handled with the :class:`str` type even though the HTTP protocol -is itself bytes oriented. +is itself bytes-oriented. The PEP differentiates so-called *native strings* that are used for request/response headers and metadata versus *byte strings* which are used for @@ -498,8 +498,8 @@ Some smaller changes made to the core Py (See :issue:`4617`.) * The internal :c:type:`structsequence` tool now creates subclasses of tuple. - This means that C generated structures like those returned by :func:`os.stat`, - :func:`time.gmtime`, and :func:`sys.version_info` now work like a + This means that C-generated structures like those returned by :func:`os.stat`, + :func:`time.gmtime` and :func:`sys.version_info` now work like a :term:`named tuple` and now work with functions and methods that expect a tuple as an argument. The is a big step forward in making the C structures as flexible as their pure Python counterparts. @@ -542,7 +542,7 @@ Some smaller changes made to the core Py :class:`collections.Sequence` :term:`abstract base class`. As a result, the language will have a more uniform API. In addition, :class:`range` objects now support slicing and negative indices. This makes *range* more - interoperable with lists:: + compatible with lists:: >>> range(0, 100, 2).count(10) 1 @@ -556,7 +556,7 @@ Some smaller changes made to the core Py (Contributed by Daniel Stutzbach in :issue:`9213` and by Alexander Belopolsky in :issue:`2690`.) -* The :func:`callable` builtin function from Py2.x was resurrected. It provides +* The :func:`callable` built-in function from Python 2.x was resurrected. It provides a concise, readable alternative to using an :term:`abstract base class` in an expression like ``isinstance(x, collections.Callable)``: @@ -591,9 +591,9 @@ mcbs encoding, locale-aware encodings, o Another significant win is the addition of substantially better support for *SSL* connections and security certificates. -In addition, more functions and classes now have a :term:`context manager` to -support convenient and reliable resource clean-up using the -:keyword:`with`-statement. +In addition, more functions and classes now behave as :term:`context managers +`, to support convenient and reliable resource cleanup using +the :keyword:`with` statement. email ----- @@ -887,7 +887,7 @@ both roles. The basic idea is that both context managers and function decorators can be used for pre-action and post-action wrappers. Context managers wrap a group of -statements using the :keyword:`with`-statement, and function decorators wrap a +statements using the :keyword:`with` statement, and function decorators wrap a group of statements enclosed in a function. So, occasionally there is a need to write a pre-action or post-action wrapper that can be used in either role. @@ -920,7 +920,7 @@ Now, it can be used as a decorator as we Trying to fulfill two roles at once places some limitations on the technique. Context managers normally have the flexibility to return an argument usable by -the :keyword:`with`-statement, but there is no parallel for function decorators. +the :keyword:`with` statement, but there is no parallel for function decorators. 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 @@ -1002,7 +1002,7 @@ popen ----- The :func:`os.popen` and :func:`subprocess.Popen` functions now support -the :keyword:`with`-statement` for auto-closing of the file descriptors. +the :keyword:`with` statement` for auto-closing of the file descriptors. gzip and zipfile ---------------- @@ -1014,7 +1014,7 @@ zero-padded file objects. The :mod:`gzip` module also gains the :func:`~gzip.compress` and :func:`~gzip.decompress` functions for easier in-memory compression and -decompression. Keep in mind that text needs to be encoded in to :class:`bytes` +decompression. Keep in mind that text needs to be encoded to :class:`bytes` before compressing and decompressing: >>> s = 'Three shall be the number thou shalt count, ' @@ -1634,8 +1634,8 @@ A table of quick links has been added to accompanied by tables of cheatsheet-style summaries to provide an overview and memory jog without having to read all of the docs. -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 +In some cases, the pure Python source code can be an helpful adjunct to the docs, +so some modules now 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`.