Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Doc/whatsnew/2.4.rst

    r2 r391  
    412412subprocess and the parent.
    413413
     414.. index::
     415   single: universal newlines; What's new
     416
    414417The constructor has a number of handy options:
    415418
     
    425428
    426429* *universal_newlines* opens the child's input and output using Python's
    427   universal newline feature.
     430  :term:`universal newlines` feature.
    428431
    429432Once you've created the :class:`Popen` instance,  you can call its :meth:`wait`
     
    471474
    472475Python has always supported floating-point (FP) numbers, based on the underlying
    473 C :ctype:`double` type, as a data type.  However, while most programming
     476C :c:type:`double` type, as a data type.  However, while most programming
    474477languages provide a floating-point type, many people (even programmers) are
    475478unaware that floating-point numbers don't represent certain decimal fractions
     
    500503
    501504Modern systems usually provide floating-point support that conforms to a
    502 standard called IEEE 754.  C's :ctype:`double` type is usually implemented as a
     505standard called IEEE 754.  C's :c:type:`double` type is usually implemented as a
    50350664-bit IEEE 754 number, which uses 52 bits of space for the mantissa.  This
    504507means that numbers can only be specified to 52 bits of precision.  If you're
     
    738741functions in Python's implementation required that the numeric locale remain set
    739742to the ``'C'`` locale.  Often this was because the code was using the C
    740 library's :cfunc:`atof` function.
     743library's :c:func:`atof` function.
    741744
    742745Not setting the numeric locale caused trouble for extensions that used third-
     
    748751API that perform ASCII-only conversions, ignoring the locale setting:
    749752
    750 * :cfunc:`PyOS_ascii_strtod(str, ptr)`  and :cfunc:`PyOS_ascii_atof(str, ptr)`
    751   both convert a string to a C :ctype:`double`.
    752 
    753 * :cfunc:`PyOS_ascii_formatd(buffer, buf_len, format, d)` converts a
    754   :ctype:`double` to an ASCII string.
     753* :c:func:`PyOS_ascii_strtod(str, ptr)`  and :c:func:`PyOS_ascii_atof(str, ptr)`
     754  both convert a string to a C :c:type:`double`.
     755
     756* :c:func:`PyOS_ascii_formatd(buffer, buf_len, format, d)` converts a
     757  :c:type:`double` to an ASCII string.
    755758
    756759The code for these functions came from the GLib library
     
    940943  space efficiency.  Appending and popping from lists now runs faster due to more
    941944  efficient code paths and less frequent use of the underlying system
    942   :cfunc:`realloc`.  List comprehensions also benefit.   :meth:`list.extend` was
     945  :c:func:`realloc`.  List comprehensions also benefit.   :meth:`list.extend` was
    943946  also optimized and no longer converts its argument into a temporary list before
    944947  extending the base list.  (Contributed by Raymond Hettinger.)
     
    949952
    950953* The methods :meth:`list.__getitem__`, :meth:`dict.__getitem__`, and
    951   :meth:`dict.__contains__` are are now implemented as :class:`method_descriptor`
     954  :meth:`dict.__contains__` are now implemented as :class:`method_descriptor`
    952955  objects rather than :class:`wrapper_descriptor` objects.  This form of  access
    953956  doubles their performance and makes them more suitable for use as arguments to
     
    10681071  3.0 version of the package uses a new incremental parser for MIME messages,
    10691072  available in the :mod:`email.FeedParser` module.  The new parser doesn't require
    1070   reading the entire message into memory, and doesn't throw exceptions if a
     1073  reading the entire message into memory, and doesn't raise exceptions if a
    10711074  message is malformed; instead it records any problems in the  :attr:`defect`
    10721075  attribute of the message.  (Developed by Anthony Baxter, Barry Warsaw, Thomas
     
    14471450
    14481451* Three new convenience macros were added for common return values from
    1449   extension functions: :cmacro:`Py_RETURN_NONE`, :cmacro:`Py_RETURN_TRUE`, and
    1450   :cmacro:`Py_RETURN_FALSE`. (Contributed by Brett Cannon.)
    1451 
    1452 * Another new macro, :cmacro:`Py_CLEAR(obj)`,  decreases the reference count of
     1452  extension functions: :c:macro:`Py_RETURN_NONE`, :c:macro:`Py_RETURN_TRUE`, and
     1453  :c:macro:`Py_RETURN_FALSE`. (Contributed by Brett Cannon.)
     1454
     1455* Another new macro, :c:macro:`Py_CLEAR(obj)`,  decreases the reference count of
    14531456  *obj* and sets *obj* to the null pointer.  (Contributed by Jim Fulton.)
    14541457
    1455 * A new function, :cfunc:`PyTuple_Pack(N, obj1, obj2, ..., objN)`, constructs
     1458* A new function, :c:func:`PyTuple_Pack(N, obj1, obj2, ..., objN)`, constructs
    14561459  tuples from a variable length argument list of Python objects.  (Contributed by
    14571460  Raymond Hettinger.)
    14581461
    1459 * A new function, :cfunc:`PyDict_Contains(d, k)`, implements fast dictionary
     1462* A new function, :c:func:`PyDict_Contains(d, k)`, implements fast dictionary
    14601463  lookups without masking exceptions raised during the look-up process.
    14611464  (Contributed by Raymond Hettinger.)
    14621465
    1463 * The :cmacro:`Py_IS_NAN(X)` macro returns 1 if  its float or double argument
     1466* The :c:macro:`Py_IS_NAN(X)` macro returns 1 if  its float or double argument
    14641467  *X* is a NaN.   (Contributed by Tim Peters.)
    14651468
    14661469* C code can avoid unnecessary locking by using the new
    1467   :cfunc:`PyEval_ThreadsInitialized` function to tell  if any thread operations
     1470  :c:func:`PyEval_ThreadsInitialized` function to tell  if any thread operations
    14681471  have been performed.  If this function  returns false, no lock operations are
    14691472  needed. (Contributed by Nick Coghlan.)
    14701473
    1471 * A new function, :cfunc:`PyArg_VaParseTupleAndKeywords`, is the same as
    1472   :cfunc:`PyArg_ParseTupleAndKeywords` but takes a  :ctype:`va_list` instead of a
     1474* A new function, :c:func:`PyArg_VaParseTupleAndKeywords`, is the same as
     1475  :c:func:`PyArg_ParseTupleAndKeywords` but takes a  :c:type:`va_list` instead of a
    14731476  number of arguments. (Contributed by Greg Chapman.)
    14741477
    14751478* A new method flag, :const:`METH_COEXISTS`, allows a function defined in slots
    1476   to co-exist with a :ctype:`PyCFunction` having the same name.  This can halve
     1479  to co-exist with a :c:type:`PyCFunction` having the same name.  This can halve
    14771480  the access time for a method such as :meth:`set.__contains__`.  (Contributed by
    14781481  Raymond Hettinger.)
     
    14881491  register".  (Contributed by Jeremy Hylton.)
    14891492
    1490 * The :ctype:`tracebackobject` type has been renamed to
    1491   :ctype:`PyTracebackObject`.
     1493* The :c:type:`tracebackobject` type has been renamed to
     1494  :c:type:`PyTracebackObject`.
    14921495
    14931496.. ======================================================================
     
    15561559
    15571560The author would like to thank the following people for offering suggestions,
    1558 corrections and assistance with various drafts of this article: Koray Can, Hye-
    1559 Shik Chang, Michael Dyck, Raymond Hettinger, Brian Hurt, Hamish Lawson, Fredrik
    1560 Lundh, Sean Reifschneider, Sadruddin Rejeb.
    1561 
     1561corrections and assistance with various drafts of this article: Koray Can,
     1562Hye-Shik Chang, Michael Dyck, Raymond Hettinger, Brian Hurt, Hamish Lawson,
     1563Fredrik Lundh, Sean Reifschneider, Sadruddin Rejeb.
     1564
Note: See TracChangeset for help on using the changeset viewer.