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
f41857e1
Commit
f41857e1
authored
Apr 04, 2009
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More notes on 3.1 improvements.
parent
e7ec57dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
2 deletions
+57
-2
Doc/whatsnew/3.1.rst
Doc/whatsnew/3.1.rst
+57
-2
No files found.
Doc/whatsnew/3.1.rst
View file @
f41857e1
...
...
@@ -88,12 +88,12 @@ order. The :mod:`collections` module's :meth:`namedtuple._asdict` method now
returns a dictionary with the values appearing in the same order as the
underlying tuple.count 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
builtin
for third-party tools like PyYAML.
Support was also
added
for third-party tools like PyYAML.
.. seealso::
:pep:`372` - Ordered Dictionaries
PEP written by Armin Ro
ancher and Raymond D.
Hettinger; implemented by
PEP written by Armin Ro
nacher and Raymond
Hettinger; implemented by
Raymond Hettinger
PEP 378: Format Specifier for Thousands Separator
...
...
@@ -211,6 +211,48 @@ Some smaller changes made to the core Python language are:
(Contributed by Raymond Hettinger.)
* :class:`collections.deque` objects now have a read-only attribute
called *maxlen*.
(Contributed by Raymond Hettinger.)
* :func:`collections.namedtuple` now supports a keyword argument
*rename* which lets invalid fieldnames be automatically converted to
positional names in the form _0, _1, etc. This is useful when
the field names are being created by an external source such as a
CSV header, SQL field list, or user input.
(Contributed by Raymond Hettinger; :issue:`1818`.)
* :func:`round`(x, n) now returns an integer if *x* is an integer.
Previously it returned a float.
(Contributed by Mark Dickinson; :issue:`4707`.)
* The :func:`re.sub`, :func:`re.subn` and :func:`re.split` functions now
accept a flags parameter.
(Contributed by Gregory Smith.)
* The :mod:`runpy` module which supports the ``-m`` command line switch
now supports the execution of packages by looking for and executing
a ``__main__`` submodule when a package name is supplied.
(Contributed by Andi Vajda; :issue:`4195`.)
* The :mod:`pdb` module can now access and display source code loaded via
:mod:`zipimport` (or any other conformant :pep:`302` loader).
(Contributed by Alexander Belopolsky; :issue:`4201`.)
* :class:`functools.partial` objects can now be pickled.
(Suggested by Antoine Pitrou and Jesse Noller. Implemented by
Jack Diedrich; :issue:`5228`.)
XXX Brett Cannon's importlib package
XXX New unittest assert methods
.. ======================================================================
...
...
@@ -242,6 +284,19 @@ Major performance enhancements have been added:
(Contributed by Antoine Pitrou, :issue:`4688`.)
* Enabling a configure option named ``--with-computed-gotos``
on compilers that support it (notably: gcc, SunPro, icc), the bytecode
evaluation loop is compiled with a new dispatch mechanism which gives
speedups of up to 20%, depending on the system, on various benchmarks.
(Contributed by Antoine Pitrou and Jeffrey Yasskin along with a number
of other participants, :issue:`4753`).
* The decoding of UTF-8, UTF-16 and LATIN-1 is now two to four times
faster.
(Contributed by Antoine Pitrou and Amaury Forgeot d'Arc, :issue:`4868`.)
XXX The JSON module is getting a C extension for speed.
.. ======================================================================
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