blob: c26be0a7d600133e91cfbce41f4f3ba85c48202b [file] [log] [blame]
Fred Drake2db76802004-12-01 05:05:47 +00001\documentclass{howto}
2\usepackage{distutils}
3% $Id$
4
Fred Drake2db76802004-12-01 05:05:47 +00005
6\title{What's New in Python 2.5}
7\release{0.0}
Andrew M. Kuchling92e24952004-12-03 13:54:09 +00008\author{A.M. Kuchling}
9\authoraddress{\email{amk@amk.ca}}
Fred Drake2db76802004-12-01 05:05:47 +000010
11\begin{document}
12\maketitle
13\tableofcontents
14
15This article explains the new features in Python 2.5. No release date
Andrew M. Kuchling92e24952004-12-03 13:54:09 +000016for Python 2.5 has been set; it will probably be released in late 2005.
Fred Drake2db76802004-12-01 05:05:47 +000017
18% Compare with previous release in 2 - 3 sentences here.
19
20This article doesn't attempt to provide a complete specification of
21the new features, but instead provides a convenient overview. For
22full details, you should refer to the documentation for Python 2.5.
23% add hyperlink when the documentation becomes available online.
24If you want to understand the complete implementation and design
25rationale, refer to the PEP for a particular new feature.
26
27
28%======================================================================
29
30% Large, PEP-level features and changes should be described here.
31
32
33%======================================================================
34\section{Other Language Changes}
35
36Here are all of the changes that Python 2.5 makes to the core Python
37language.
38
39\begin{itemize}
Andrew M. Kuchling1cae3f52004-12-03 14:57:21 +000040
41\item The \function{min()} and \function{max()} built-in functions
42gained a \code{key} keyword argument analogous to the \code{key}
43argument for \function{sort()}. This argument supplies a function
44that takes a single argument and is called for every value in the list;
45\function{min()}/\function{max()} will return the element with the
46smallest/largest return value from this function.
47For example, to find the longest string in a list, you can do:
48
49\begin{verbatim}
50L = ['medium', 'longest', 'short']
51# Prints 'longest'
52print max(L, key=len)
53# Prints 'short', because lexicographically 'short' has the largest value
54print max(L)
55\end{verbatim}
56
57(Contributed by Steven Bethard and Raymond Hettinger.)
Fred Drake2db76802004-12-01 05:05:47 +000058
59\end{itemize}
60
61
62%======================================================================
63\subsection{Optimizations}
64
65\begin{itemize}
66
67\item Optimizations should be described here.
68
69\end{itemize}
70
71The net result of the 2.5 optimizations is that Python 2.5 runs the
Andrew M. Kuchling92e24952004-12-03 13:54:09 +000072pystone benchmark around XX\% faster than Python 2.4.
Fred Drake2db76802004-12-01 05:05:47 +000073
74
75%======================================================================
76\section{New, Improved, and Deprecated Modules}
77
78As usual, Python's standard library received a number of enhancements and
79bug fixes. Here's a partial list of the most notable changes, sorted
80alphabetically by module name. Consult the
81\file{Misc/NEWS} file in the source tree for a more
82complete list of changes, or look through the CVS logs for all the
83details.
84
85\begin{itemize}
86
87\item Descriptions go here.
88
89\end{itemize}
90
91
92%======================================================================
93% whole new modules get described in \subsections here
94
95
96% ======================================================================
97\section{Build and C API Changes}
98
99Changes to Python's build process and to the C API include:
100
101\begin{itemize}
102
103\item Detailed changes are listed here.
104
105\end{itemize}
106
107
108%======================================================================
109\subsection{Port-Specific Changes}
110
111Platform-specific changes go here.
112
113
114%======================================================================
115\section{Other Changes and Fixes \label{section-other}}
116
117As usual, there were a bunch of other improvements and bugfixes
118scattered throughout the source tree. A search through the CVS change
119logs finds there were XXX patches applied and YYY bugs fixed between
Andrew M. Kuchling92e24952004-12-03 13:54:09 +0000120Python 2.4 and 2.5. Both figures are likely to be underestimates.
Fred Drake2db76802004-12-01 05:05:47 +0000121
122Some of the more notable changes are:
123
124\begin{itemize}
125
126\item Details go here.
127
128\end{itemize}
129
130
131%======================================================================
132\section{Porting to Python 2.5}
133
134This section lists previously described changes that may require
135changes to your code:
136
137\begin{itemize}
138
139\item Everything is all in the details!
140
141\end{itemize}
142
143
144%======================================================================
145\section{Acknowledgements \label{acks}}
146
147The author would like to thank the following people for offering
148suggestions, corrections and assistance with various drafts of this
149article: .
150
151\end{document}