diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2007-02-26 23:54:17 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2007-02-26 23:54:17 (GMT) |
commit | c6a1ef3fe15632e4476a70d80ad4bb5f61dd5953 (patch) | |
tree | 93e0170ca6bb93c61efbabcda4cf4c10e3743b41 /Doc/whatsnew | |
parent | f83b751f4b60901248e9916de6e544720bb22ab1 (diff) | |
download | cpython-c6a1ef3fe15632e4476a70d80ad4bb5f61dd5953.zip cpython-c6a1ef3fe15632e4476a70d80ad4bb5f61dd5953.tar.gz cpython-c6a1ef3fe15632e4476a70d80ad4bb5f61dd5953.tar.bz2 |
Add some items
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/whatsnew26.tex | 50 |
1 files changed, 48 insertions, 2 deletions
diff --git a/Doc/whatsnew/whatsnew26.tex b/Doc/whatsnew/whatsnew26.tex index 3fa9b69..fe0a6dd 100644 --- a/Doc/whatsnew/whatsnew26.tex +++ b/Doc/whatsnew/whatsnew26.tex @@ -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} |