Commit 9c67ee08 authored by Andrew M. Kuchling's avatar Andrew M. Kuchling

Tidy up the document in preparation for 2.5alpha1. Hope I didn't break the markup...

parent b882f473
...@@ -21,6 +21,10 @@ This article explains the new features in Python 2.5. No release date ...@@ -21,6 +21,10 @@ This article explains the new features in Python 2.5. No release date
for Python 2.5 has been set; it will probably be released in the for Python 2.5 has been set; it will probably be released in the
autumn of 2006. autumn of 2006.
(This is still an early draft, and some sections are still skeletal or
completely missing. Comments on the present material will still be
welcomed.)
% XXX Compare with previous release in 2 - 3 sentences here. % XXX Compare with previous release in 2 - 3 sentences here.
This article doesn't attempt to provide a complete specification of This article doesn't attempt to provide a complete specification of
...@@ -48,10 +52,10 @@ else: ...@@ -48,10 +52,10 @@ else:
\end{verbatim} \end{verbatim}
There have been endless tedious discussions of syntax on both There have been endless tedious discussions of syntax on both
python-dev and comp.lang.python, and even a vote that found the python-dev and comp.lang.python. A vote was even held that found the
majority of voters wanted some way to write conditional expressions, majority of voters wanted conditional expressions in some form,
but there was no syntax that was clearly preferred by a majority. but there was no syntax that was preferred by a clear majority.
Candidates include C's \code{cond ? true_v : false_v}, Candidates included C's \code{cond ? true_v : false_v},
\code{if cond then true_v else false_v}, and 16 other variations. \code{if cond then true_v else false_v}, and 16 other variations.
GvR eventually chose a surprising syntax: GvR eventually chose a surprising syntax:
...@@ -299,7 +303,7 @@ form of the import statement, only the \code{from ... import} form. ...@@ -299,7 +303,7 @@ form of the import statement, only the \code{from ... import} form.
\seepep{328}{Imports: Multi-Line and Absolute/Relative}{PEP written \seepep{328}{Imports: Multi-Line and Absolute/Relative}{PEP written
by Aahz; implemented by XXX.} by Aahz; implemented by XXX.}
\seeurl{XXX}{py.std} %\seeurl{http://codespeak.net/py/current/doc/misc.html\#mapping-the-standard-python-library-into-py}{py.std}
\end{seealso} \end{seealso}
...@@ -369,9 +373,7 @@ handler or the \var{else-block} and a new exception is raised, the ...@@ -369,9 +373,7 @@ handler or the \var{else-block} and a new exception is raised, the
\begin{seealso} \begin{seealso}
\seepep{341}{Unifying try-except and try-finally}{PEP written by Georg Brandl; \seepep{341}{Unifying try-except and try-finally}{PEP written by Georg Brandl;
implementation by Thomas Lee. implementation by Thomas Lee.}
XXX check implementor -- http://python.org/sf/1355913
}
\end{seealso} \end{seealso}
...@@ -582,7 +584,7 @@ with open('/etc/passwd', 'r') as f: ...@@ -582,7 +584,7 @@ with open('/etc/passwd', 'r') as f:
\end{verbatim} \end{verbatim}
The \module{threading} module's locks and condition variables The \module{threading} module's locks and condition variables
also support the new statement: also support the \keyword{with} statement:
\begin{verbatim} \begin{verbatim}
lock = threading.Lock() lock = threading.Lock()
...@@ -616,8 +618,12 @@ with decimal.Context(prec=16): ...@@ -616,8 +618,12 @@ with decimal.Context(prec=16):
% XXX write this % XXX write this
This section still needs to be written.
The new \module{contextlib} module provides some functions and a The new \module{contextlib} module provides some functions and a
decorator that are useful for writing context managers. decorator that are useful for writing context managers.
Future versions will go into more detail.
% XXX describe further % XXX describe further
\begin{seealso} \begin{seealso}
...@@ -735,7 +741,7 @@ its result. ...@@ -735,7 +741,7 @@ its result.
\begin{seealso} \begin{seealso}
\seepep{357}{Allowing Any Object to be Used for Slicing}{PEP written \seepep{357}{Allowing Any Object to be Used for Slicing}{PEP written
(XXX and implemented?) by Travis Oliphant.} and implemented by Travis Oliphant.}
\end{seealso} \end{seealso}
...@@ -831,7 +837,7 @@ code corresponding to \code{a = 5}. ...@@ -831,7 +837,7 @@ code corresponding to \code{a = 5}.
\end{itemize} \end{itemize}
The net result of the 2.5 optimizations is that Python 2.5 runs the The net result of the 2.5 optimizations is that Python 2.5 runs the
pystone benchmark around XX\% faster than Python 2.4. pystone benchmark around XXX\% faster than Python 2.4.
%====================================================================== %======================================================================
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment