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
c6a1ef3f
Commit
c6a1ef3f
authored
Feb 26, 2007
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some items
parent
f83b751f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
2 deletions
+48
-2
Doc/whatsnew/whatsnew26.tex
Doc/whatsnew/whatsnew26.tex
+48
-2
No files found.
Doc/whatsnew/whatsnew26.tex
View file @
c6a1ef3f
...
...
@@ -37,7 +37,13 @@ Here are all of the changes that Python 2.6 makes to the core Python
language.
\begin{itemize}
\item
TBD
% Bug 1569356
\item
An obscure change: when you use the the
\function
{
locals()
}
function inside a
\keyword
{
class
}
statement, the resulting dictionary
no longer returns free variables. (Free variables, in this case, are
variables referred to in the
\keyword
{
class
}
statement
that aren't attributes of the class.)
\end{itemize}
...
...
@@ -47,7 +53,10 @@ language.
\begin{itemize}
\item
Optimizations should be described here.
% Patch 1624059
\item
Internally, a bit is now set in type objects to indicate some of
the standard built-in types. This speeds up checking if an object is
a subclass of one of these types. (Contributed by Neal Norwitz.)
\end{itemize}
...
...
@@ -67,6 +76,43 @@ details.
\begin{itemize}
\item
New function in the
\module
{
heapq
}
module:
\function
{
merge(iter1, iter2, ...)
}
takes any number of iterables that return data
\emph
{
in sorted order
}
,
and
returns a new iterator that returns the contents of
all the iterators, also in sorted order. For example:
\begin{verbatim}
heapq.merge([1, 3, 5, 9], [2, 8, 16]) ->
[1, 2, 3, 5, 8, 9, 16]
\end{verbatim}
(Contributed by Raymond Hettinger.)
\item
New function in the
\module
{
itertools
}
module:
\function
{
izip
_
longest(iter1, iter2, ...
\optional
{
, fillvalue
}
)
}
makes tuples from each of the elements; if some of the iterables
are shorter than others, the missing values
are set to
\var
{
fillvalue
}
. For example:
\begin{verbatim}
itertools.izip
_
longest([1,2,3], [1,2,3,4,5]) ->
[(1, 1), (2, 2), (3, 3), (None, 4), (None, 5)]
\end{verbatim}
(Contributed by Raymond Hettinger.)
% Patch #1490190
\item
New functions in the
\module
{
posix
}
module:
\function
{
chflags()
}
and
\function
{
lchflags()
}
are wrappers for the corresponding system
calls (where they're available). Constants for the flag values are
defined in the
\module
{
stat
}
module; some possible values include
\constant
{
UF
_
IMMUTABLE
}
to signal the file may not be changed and
\constant
{
UF
_
APPEND
}
to indicate that data can only be appended to the
file. (Contributed by M. Levinson.)
\item
The
\module
{
smtplib
}
module now supports SMTP over
SSL thanks to the addition of the
\class
{
SMTP
_
SSL
}
class.
This class supports an interface identical to the existing
\class
{
SMTP
}
...
...
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