Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
363dbccb
Commit
363dbccb
authored
Apr 14, 2010
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add various items; correct argparse output
parent
9f5fd609
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
10 deletions
+31
-10
Doc/whatsnew/2.7.rst
Doc/whatsnew/2.7.rst
+31
-10
No files found.
Doc/whatsnew/2.7.rst
View file @
363dbccb
...
@@ -182,14 +182,21 @@ remains O(1).
...
@@ -182,14 +182,21 @@ remains O(1).
.. :meth:`~collections.namedtuple._asdict()` (see below)
.. :meth:`~collections.namedtuple._asdict()` (see below)
The standard library now supports use of ordered dictionaries in several
The standard library now supports use of ordered dictionaries in several
modules. The :mod:`ConfigParser` module uses them by default. This lets
modules.
configuration files be read, modified, and then written back in their original
order. The :meth:`~collections.somenamedtuple._asdict()` method for
* The :mod:`ConfigParser` module uses them by default, letting
:func:`collections.namedtuple` now returns an ordered dictionary with the
configuration files be read, modified, and then written back in their original
values appearing in the same order as the underlying tuple indices.
order.
The :mod:`json` module is being built-out with an *object_pairs_hook* to allow
OrderedDicts to be built by the decoder.
* The :meth:`~collections.somenamedtuple._asdict()` method for
Support was also added for third-party tools like `PyYAML <http://pyyaml.org/>`_.
: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::
.. seealso::
...
@@ -286,7 +293,7 @@ Unless you override it, :option:`-h` and :option:`--help` switches
...
@@ -286,7 +293,7 @@ Unless you override it, :option:`-h` and :option:`--help` switches
are automatically added, and produce neatly formatted output::
are automatically added, and produce neatly formatted output::
-> ./python.exe argparse-example.py --help
-> ./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.
Command-line example.
...
@@ -860,6 +867,13 @@ changes, or look through the Subversion logs for all the details.
...
@@ -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
left-alignment. This has been changed to right-alignment, which seems
more sensible for numeric types. (Changed by Mark Dickinson; :issue:`6857`.)
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
* The :class:`~fractions.Fraction` class now accepts a single float or
:class:`~decimal.Decimal` instance, or two rational numbers, as
:class:`~decimal.Decimal` instance, or two rational numbers, as
arguments to its constructor. (Implemented by Mark Dickinson;
arguments to its constructor. (Implemented by Mark Dickinson;
...
@@ -1621,6 +1635,13 @@ Port-Specific Changes: Windows
...
@@ -1621,6 +1635,13 @@ Port-Specific Changes: Windows
the native thread-local storage functions are now used.
the native thread-local storage functions are now used.
(Contributed by Kristjan Valur Jonsson; :issue:`3582`.)
(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
* The :func:`os.listdir` function now correctly fails
for an empty path. (Fixed by Hirokazu Yamamoto; :issue:`5913`.)
for an empty path. (Fixed by Hirokazu Yamamoto; :issue:`5913`.)
...
@@ -1730,5 +1751,5 @@ Acknowledgements
...
@@ -1730,5 +1751,5 @@ Acknowledgements
The author would like to thank the following people for offering
The author would like to thank the following people for offering
suggestions, corrections and assistance with various drafts of this
suggestions, corrections and assistance with various drafts of this
article: Ryan Lovett, Hugh Secker-Walker.
article: Ryan Lovett,
R. David Murray,
Hugh Secker-Walker.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment