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
6d7dfa23
Commit
6d7dfa23
authored
Apr 11, 2010
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add two items
parent
884d0a3c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
4 deletions
+23
-4
Doc/whatsnew/2.7.rst
Doc/whatsnew/2.7.rst
+23
-4
No files found.
Doc/whatsnew/2.7.rst
View file @
6d7dfa23
...
...
@@ -10,6 +10,7 @@
.. Big jobs: argparse, ElementTree 1.3, pep 391, 3106, sysconfig
.. unittest test discovery
.. hyperlink all the methods & functions.
.. $Id$
Rules for maintenance:
...
...
@@ -717,10 +718,13 @@ changes, or look through the Subversion logs for all the details.
(Added by Raymond Hettinger; :issue:`1818`.)
The :class:`~collections.deque` data type now exposes its maximum length as the
read-only :attr:`~collections.deque.maxlen` attribute, and has a
:meth:`~collections.deque.reverse` method that reverses the elements of the deque in-place.
(Added by Raymond Hettinger.)
The :class:`~collections.deque` data type now has a
:meth:`~collections.deque.count` method that returns the number of
contained elements equal to the supplied argument *x*, and a
:meth:`~collections.deque.reverse` method that reverses the elements
of the deque in-place. :class:`deque` also exposes its maximum
length as the read-only :attr:`~collections.deque.maxlen` attribute.
(Both features added by Raymond Hettinger.)
* The :mod:`copy` module's :func:`~copy.deepcopy` function will now
correctly copy bound instance methods. (Implemented by
...
...
@@ -782,6 +786,21 @@ changes, or look through the Subversion logs for all the details.
uploads thanks to an added *rest* parameter (patch by Pablo Mouzo;
:issue:`6845`.)
* New class decorator: :func:`total_ordering` in the :mod:`functools`
module takes a class that defines an :meth:`__eq__` method and one of
:meth:`__lt__`, :meth:`__le__`, :meth:`__gt__`, or :meth:`__ge__`,
and generates the missing comparison methods. Since the
:meth:`__cmp__` method is being deprecated in Python 3.x,
this decorator makes it easier to define ordered classes.
(Added by Raymond Hettinger; :issue:`5479`.)
New function: :func:`cmp_to_key` will take an old-style comparison
function that expects two arguments and return a new callable that
can be used as the *key* parameter to functions such as
:func:`sorted`, :func:`min` and :func:`max`, etc. The primary
intended use is to help with making code compatible with Python 3.x.
(Added by Raymond Hettinger.)
* New function: the :mod:`gc` module's :func:`~gc.is_tracked` returns
true if a given instance is tracked by the garbage collector, false
otherwise. (Contributed by Antoine Pitrou; :issue:`4688`.)
...
...
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