From: Fred L. D. <fd...@us...> - 2001-07-17 13:55:36
|
Update of /cvsroot/py-howto/pyhowto In directory usw-pr-cvs1:/tmp/cvs-serv4354 Modified Files: python-22.tex Log Message: Cleaned up a number of minor nits, use markup a little more consistently. Index: python-22.tex =================================================================== RCS file: /cvsroot/py-howto/pyhowto/python-22.tex,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** python-22.tex 2001/07/17 12:48:48 1.9 --- python-22.tex 2001/07/17 13:55:33 1.10 *************** *** 24,29 **** the new features, but instead provides a convenient overview of the new features. For full details, you should refer to 2.2 documentation ! such as the Library Reference and the Reference Guide, or to the PEP ! for a particular new feature. The final release of Python 2.2 is planned for October 2001. --- 24,34 ---- the new features, but instead provides a convenient overview of the new features. For full details, you should refer to 2.2 documentation ! such as the ! \citetitle[http://python.sourceforge.net/devel-docs/lib/lib.html]{Python ! Library Reference} and the ! \citetitle[http://python.sourceforge.net/devel-docs/ref/ref.html]{Python ! Reference Manual}, or to the PEP for a particular new feature. ! % These \citetitle marks should get the python.org URLs for the final ! % release, just as soon as the docs are published there. The final release of Python 2.2 is planned for October 2001. *************** *** 75,80 **** simple. A new built-in function, \function{iter(obj)}, returns an iterator for the object \var{obj}. (It can also take two arguments: ! \code{iter(\var{C}, \var{sentinel})} will call the callable \var{C}, until it ! returns \var{sentinel}, which will signal that the iterator is done. This form probably won't be used very often.) Python classes can define an \method{__iter__()} method, which should --- 80,86 ---- simple. A new built-in function, \function{iter(obj)}, returns an iterator for the object \var{obj}. (It can also take two arguments: ! \code{iter(\var{C}, \var{sentinel})} will call the callable \var{C}, ! until it returns \var{sentinel}, which will signal that the iterator ! is done. This form probably won't be used very often.) Python classes can define an \method{__iter__()} method, which should *************** *** 129,133 **** \keyword{in} operator now works on dictionaries, so \code{\var{key} in dict} is now equivalent to \code{dict.has_key(\var{key})}. ! Calling \function{iter()} on a dictionary will return an iterator which loops over their keys: \begin{verbatim} --- 135,140 ---- \keyword{in} operator now works on dictionaries, so \code{\var{key} in dict} is now equivalent to \code{dict.has_key(\var{key})}. ! Calling \function{iter()} on a dictionary will return an iterator ! which loops over their keys: \begin{verbatim} *************** *** 167,171 **** Note that you can only go forward in an iterator; there's no way to get the previous element, reset the iterator, or make a copy of it. ! An iterator object could provide such additional capabilities, but the iterator protocol only requires a \method{next()} method. \begin{seealso} --- 174,179 ---- Note that you can only go forward in an iterator; there's no way to get the previous element, reset the iterator, or make a copy of it. ! An iterator object could provide such additional capabilities, but the ! iterator protocol only requires a \method{next()} method. \begin{seealso} *************** *** 461,465 **** used in most Python code (and when it is used, it's often a sign of a poor design anyway). - %\end{seealso} \begin{seealso} --- 469,472 ---- *************** *** 502,506 **** \end{verbatim} ! See \url{http://www.xmlrpc.com} for more information about XML-RPC. \item The \module{socket} module can be compiled to support IPv6; --- 509,513 ---- \end{verbatim} ! See \url{http://www.xmlrpc.com/} for more information about XML-RPC. \item The \module{socket} module can be compiled to support IPv6; *************** *** 536,540 **** Pelletier.) ! \item The \module{rfc822} module's parsing of e-mail addresses is now compliant with \rfc{2822}, an update to \rfc{822}. The module's name is \emph{not} going to be changed to \samp{rfc2822}. --- 543,547 ---- Pelletier.) ! \item The \module{rfc822} module's parsing of email addresses is now compliant with \rfc{2822}, an update to \rfc{822}. The module's name is \emph{not} going to be changed to \samp{rfc2822}. *************** *** 559,563 **** message "\var{function} takes no keyword arguments". ! \item The code for the MacOS port for Python, maintained by Jack Jansen, is now kept in the main Python CVS tree. --- 566,570 ---- message "\var{function} takes no keyword arguments". ! \item The code for the Mac OS port for Python, maintained by Jack Jansen, is now kept in the main Python CVS tree. *************** *** 576,580 **** The existing \function{sys.setprofile()} and \function{sys.settrace()} functions still exist, and have simply ! been changed to use the new C-level interface. \item The \file{Tools/scripts/ftpmirror.py} script --- 583,588 ---- The existing \function{sys.setprofile()} and \function{sys.settrace()} functions still exist, and have simply ! been changed to use the new C-level interface. (Contributed by Fred ! L. Drake, Jr.) \item The \file{Tools/scripts/ftpmirror.py} script *************** *** 599,606 **** \item XXX C API: Reorganization of object calling ! The call_object() ! function, originally in ceval.c, begins a new life as the official ! API PyObject_Call(). It is also much simplified: all it does is call ! the tp_call slot, or raise an exception if that's NULL. %The subsidiary functions (call_eval_code2(), call_cfunction(), --- 607,614 ---- \item XXX C API: Reorganization of object calling ! The \cfunction{call_object()} function, originally in \file{ceval.c}, ! begins a new life as the official API \cfunction{PyObject_Call()}. It ! is also much simplified: all it does is call the \member{tp_call} ! slot, or raise an exception if that's \NULL. %The subsidiary functions (call_eval_code2(), call_cfunction(), *************** *** 621,625 **** python-dev and in patch 410465. ! \item XXX Lots of patches to dictionaries; measure performance improvement, if any. \end{itemize} --- 629,634 ---- python-dev and in patch 410465. ! \item XXX Lots of patches to dictionaries; measure performance ! improvement, if any. \end{itemize} |