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
d207e230
Commit
d207e230
authored
Aug 27, 2008
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trim whitespace; add a few updates
parent
0668c626
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
105 additions
and
66 deletions
+105
-66
Doc/whatsnew/2.6.rst
Doc/whatsnew/2.6.rst
+105
-66
No files found.
Doc/whatsnew/2.6.rst
View file @
d207e230
...
...
@@ -1436,6 +1436,18 @@ Here are all of the changes that Python 2.6 makes to the core Python language.
(Contributed by Alexander Belopolsky; :issue:`1686487`.)
It's also now legal to provide keyword arguments after a ``*args`` argument
to a function call.
>>> def f(*args, **kw):
... print args, kw
...
>>> f(1,2,3, *(4,5,6), keyword=13)
(1, 2, 3, 4, 5, 6) {'keyword': 13}
Previously this would have been a syntax error.
(Contributed by Amaury Forgeot d'Arc; :issue:`3473`.)
* A new built-in, ``next(*iterator*, [*default*])`` returns the next item
from the specified iterator. If the *default* argument is supplied,
it will be returned if *iterator* has been exhausted; otherwise,
...
...
@@ -1645,6 +1657,17 @@ Optimizations
(Original optimization implemented by Armin Rigo, updated for
Python 2.6 by Kevin Jacobs; :issue:`1700288`.)
By default, this change is only applied to types that are included with
the Python core. Extension modules may not necessarily be compatible with
this cache,
so they must explicitly add :cmacro:`Py_TPFLAGS_HAVE_VERSION_TAG`
to the module's ``tp_flags`` field to enable the method cache.
(To be compatible with the method cache, the extension module's code
must not directly access and modify the ``tp_dict`` member of
any of the types it implements. Most modules don't do this,
but it's impossible for the Python interpreter to determine that.
See :issue:`1878` for some discussion.)
* Function calls that use keyword arguments
are significantly faster thanks to a patch that does a quick pointer
comparison, usually saving the time of a full string comparison.
...
...
@@ -2246,6 +2269,13 @@ details.
time-consuming searches can now be interrupted.
(Contributed by Josh Hoyt and Ralf Schmitt; :issue:`846388`.)
The regular expression module is implemented by compiling bytecodes
for a tiny regex-specific virtual machine. Untrusted code
could create malicious strings of bytecode directly and cause crashes,
so Python 2.6 includes a verifier for the regex bytecode.
(Contributed by Guido van Rossum from work for Google App Engine;
:issue:`3487`.)
* The :mod:`rgbimg` module has been removed.
* The :mod:`rlcompleter` module's :meth:`Completer.complete()` method
...
...
@@ -2487,8 +2517,17 @@ details.
(Contributed by Dwayne Bailey; :issue:`1581073`.)
* The :mod:`threading` module's :class:`Thread` objects
gained a :meth:`getIdent` method that returns the thread's
* The :mod:`threading` module API is being changed for Python 3.0, to
use properties such as :attr:`daemon` instead of :meth:`setDaemon`
and :meth:`isDaemon` methods, and some methods have been renamed to
use underscores instead of camel-case; for example, the
:meth:`activeCount` method is renamed to :meth:`active_count`. The
2.6 version of the module supports the same properties and renamed
methods, but doesn't remove the old methods. (Carried out by
various people, most notably Benjamin Peterson.)
The :mod:`threading` module's :class:`Thread` objects
gained an :attr:`ident` property that returns the thread's
identifier, a nonzero integer. (Contributed by Gregory P. Smith;
:issue:`2871`.)
...
...
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