diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/whatsnew/whatsnew24.tex | 41 |
1 files changed, 38 insertions, 3 deletions
diff --git a/Doc/whatsnew/whatsnew24.tex b/Doc/whatsnew/whatsnew24.tex index 55af7bc..de06e9e 100644 --- a/Doc/whatsnew/whatsnew24.tex +++ b/Doc/whatsnew/whatsnew24.tex @@ -149,6 +149,14 @@ the string. ['a b', 'c'] \end{verbatim} +% Consider replacing the above example with one that is less +% abstract and more suggestive of why the function is useful: +% +% >>> 'www.python.org'.split('.', 1) +% ['www', 'python.org'] +% >>> 'www.python.org'.rsplit('.', 1) +% ['www.python', 'org'] + \item The \method{sort()} method of lists gained three keyword arguments, \var{cmp}, \var{key}, and \var{reverse}. These arguments make some common usages of \method{sort()} simpler. All are optional. @@ -259,7 +267,18 @@ yellow 5 \begin{itemize} -\item Optimizations should be described here. +\item \function{list()}, \function{tuple()}, \function{map()}, + \function{filter()}, and \function{zip()} now run several times + faster with non-sequence arguments that supply a \method{__len__()} + method. Previously, the pre-sizing optimization only applied to + sequence arguments. + +\item The unbound methods \method{list.__getitem__()}, + \method{dict.__getitem__()}, and \method{dict.__contains__()} are + are now implemented as \class{method_descriptor} objects rather + than \class{wrapper_descriptor} objects. This form of optimized + access doubles their performance and makes them more suitable for + use as arguments to functionals: \samp{map(dict.__contains__, mydict)}. \end{itemize} @@ -423,13 +442,22 @@ Changes to Python's build process and to the C API include: fast dictionary lookups without masking exceptions raised during the look-up process. + \item A new method flag, \code{METH_COEXISTS}, allows a function + defined in slots to co-exist with a PyCFunction having the same name. + This can halve the access to time to a method such as + \method{set.__contains__()} + \end{itemize} %====================================================================== \subsection{Port-Specific Changes} -Platform-specific changes go here. +\begin{itemize} + +\item The Windows port now builds under MSVC++ 7.1 as well as version 6. + +\end{itemize} %====================================================================== @@ -444,7 +472,14 @@ Some of the more notable changes are: \begin{itemize} -\item Details go here. +\item The \module{timeit} module now automatically disables periodic + garbarge collection during the timing loop. This change makes + consecutive timings more comparable. + +\item The \module{base64} module now has more complete RFC 3548 support + for Base64, Base32, and Base16 encoding and decoding, including + optional case folding and optional alternative alphabets. + (Contributed by Barry Warsaw.) \end{itemize} |