diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2010-04-14 23:55:17 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2010-04-14 23:55:17 (GMT) |
commit | 363dbccb2a77af59cbe3de5effa32017b4b73982 (patch) | |
tree | e2c17aba02f61b923f9b3093cf8b01cdb72bc03c | |
parent | 9f5fd6092b361282f393cf8ca875554b592140cb (diff) | |
download | cpython-363dbccb2a77af59cbe3de5effa32017b4b73982.zip cpython-363dbccb2a77af59cbe3de5effa32017b4b73982.tar.gz cpython-363dbccb2a77af59cbe3de5effa32017b4b73982.tar.bz2 |
Add various items; correct argparse output
-rw-r--r-- | Doc/whatsnew/2.7.rst | 41 |
1 files changed, 31 insertions, 10 deletions
diff --git a/Doc/whatsnew/2.7.rst b/Doc/whatsnew/2.7.rst index 8f02d1c..6f8fe1f 100644 --- a/Doc/whatsnew/2.7.rst +++ b/Doc/whatsnew/2.7.rst @@ -182,14 +182,21 @@ remains O(1). .. :meth:`~collections.namedtuple._asdict()` (see below) The standard library now supports use of ordered dictionaries in several -modules. The :mod:`ConfigParser` module uses them by default. This lets -configuration files be read, modified, and then written back in their original -order. The :meth:`~collections.somenamedtuple._asdict()` method for -:func:`collections.namedtuple` now returns an ordered dictionary with the -values appearing in the same order as the underlying tuple indices. -The :mod:`json` module is being built-out with an *object_pairs_hook* to allow -OrderedDicts to be built by the decoder. -Support was also added for third-party tools like `PyYAML <http://pyyaml.org/>`_. +modules. + +* The :mod:`ConfigParser` module uses them by default, letting + configuration files be read, modified, and then written back in their original + order. + +* The :meth:`~collections.somenamedtuple._asdict()` method for + :func:`collections.namedtuple` now returns an ordered dictionary with the + values appearing in the same order as the underlying tuple indices. + +* The :mod:`json` module's :class:`~json.JSONDecoder` class + constructor was extended with an *object_pairs_hook* parameter to + allow :class:`OrderedDict` instances to be built by the decoder. + Support was also added for third-party tools like + `PyYAML <http://pyyaml.org/>`_. .. seealso:: @@ -286,7 +293,7 @@ Unless you override it, :option:`-h` and :option:`--help` switches are automatically added, and produce neatly formatted output:: -> ./python.exe argparse-example.py --help - usage: parse.py [-h] [-v] [-o FILE] [-C NUM] + usage: argparse-example.py [-h] [-v] [-o FILE] [-C NUM] [inputs [inputs ...]] Command-line example. @@ -860,6 +867,13 @@ changes, or look through the Subversion logs for all the details. left-alignment. This has been changed to right-alignment, which seems more sensible for numeric types. (Changed by Mark Dickinson; :issue:`6857`.) +* The :mod:`difflib` module now produces output that is more + compatible with modern :command:`diff`/:command:`patch` tools thanks + to two changes: 1) the header giving the filename now uses a tab + character instead of spaces as a separator, and 2) the date format + used is now ISO-8601 style, ``2005-01-26 23:30:50``. (Fixed by + Anatoly Techtonik; :issue:`7585`.) + * The :class:`~fractions.Fraction` class now accepts a single float or :class:`~decimal.Decimal` instance, or two rational numbers, as arguments to its constructor. (Implemented by Mark Dickinson; @@ -1621,6 +1635,13 @@ Port-Specific Changes: Windows the native thread-local storage functions are now used. (Contributed by Kristjan Valur Jonsson; :issue:`3582`.) +* The :func:`os.kill` function now works on Windows. The signal value + can be the constants :const:`CTRL_C_EVENT`, + :const:`CTRL_BREAK_EVENT`, or any integer. The Control-C and + Control-Break keystroke events can be sent to subprocesses; any + other value will use the :cfunc:`TerminateProcess` API. + (Contributed by Miki Tebeka; :issue:`1220212`.) + * The :func:`os.listdir` function now correctly fails for an empty path. (Fixed by Hirokazu Yamamoto; :issue:`5913`.) @@ -1730,5 +1751,5 @@ Acknowledgements The author would like to thank the following people for offering suggestions, corrections and assistance with various drafts of this -article: Ryan Lovett, Hugh Secker-Walker. +article: Ryan Lovett, R. David Murray, Hugh Secker-Walker. |