|
From: A.M. K. <aku...@us...> - 2001-02-28 22:21:20
|
Update of /cvsroot/py-howto/pyhowto
In directory usw-pr-cvs1:/tmp/cvs-serv1299
Modified Files:
python-21.tex
Log Message:
Cover pydoc
Update reference Python version to beta1
Rip out PEP 232 section
Add placeholders for PEP 236 and 235
Fix erroneous \filename references
Index: python-21.tex
===================================================================
RCS file: /cvsroot/py-howto/pyhowto/python-21.tex,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** python-21.tex 2001/02/28 22:10:07 1.13
--- python-21.tex 2001/02/28 22:22:40 1.14
***************
*** 14,18 ****
{\large This document is a draft, and is subject to change until
the final version of Python 2.1 is released. Currently it is up to date
! for Python 2.1 alpha 2. Please send any comments, bug reports, or
questions, no matter how minor, to \email{am...@bi...}. }
--- 14,18 ----
{\large This document is a draft, and is subject to change until
the final version of Python 2.1 is released. Currently it is up to date
! for Python 2.1 beta 1. Please send any comments, bug reports, or
questions, no matter how minor, to \email{am...@bi...}. }
***************
*** 137,179 ****
%======================================================================
! \section{PEP 232: Function Attributes}
! In Python 2.1, functions can now have arbitrary information attached
! to them. People were often using docstrings to hold information about
! functions and methods, because the \code{__doc__} attribute was the
! only way of attaching any information to a function. For example, in
! the Zope Web application server, functions are marked as safe for
! public access by having a docstring, and in John Aycock's SPARK
! parsing framework, docstrings hold parts of the BNF grammar to be
! parsed. This overloading is unfortunate, since docstrings are really
! intended to hold a function's documentation, and it means you can't
! properly document functions intended for private use in Zope.
!
! Attributes can now be set and retrieved on functions, using the
! regular Python syntax:
!
! \begin{verbatim}
! def f(): pass
!
! f.publish = 1
! f.secure = 1
! f.grammar = "A ::= B (C D)*"
! \end{verbatim}
!
! The dictionary containing attributes can be accessed as
! \member{__dict__}. Unlike the \member{__dict__} attribute of class
! instances, in functions you can actually assign a new dictionary to
! \member{__dict__}, though the new value is restricted to a regular
! Python dictionary; you can't be tricky and set it to a
! \class{UserDict} instance, a DBM file, or any other random mapping
! object.
- \begin{seealso}
-
- \seepep{232}{Function Attributes}{Written and implemented by Barry
- Warsaw.}
-
- \end{seealso}
-
%======================================================================
\section{PEP 207: Rich Comparisons}
--- 137,144 ----
%======================================================================
! \section{PEP 236: \module{__future__} Directives}
! XXX
%======================================================================
\section{PEP 207: Rich Comparisons}
***************
*** 463,466 ****
--- 428,436 ----
%======================================================================
+ \section{PEP 235: Case-Insensitive Platforms and \keyword{import}}
+
+ XXX
+
+ %======================================================================
\section{PEP 217: Interactive Display Hook}
***************
*** 530,533 ****
--- 500,529 ----
\begin{itemize}
+ \item Ka-Ping Yee contributed two new modules: \module{inspect.py}, a module for
+ getting information about live Python code, and \module{pydoc.py}, a
+ module for interactively converting docstrings to HTML or text.
+ As a bonus, \file{Tools/scripts/pydoc}, which is now automatically
+ installed, uses \module{pydoc.py} to display documentation given a Python module, package, or class name. For example,
+ \samp{pydoc xml.dom} displays the following:
+
+ \begin{verbatim}
+ Python Library Documentation: package xml.dom in xml
+
+ NAME
+ xml.dom - W3C Document Object Model implementation for Python.
+
+ FILE
+ /usr/local/lib/python2.1/xml/dom/__init__.pyc
+
+ DESCRIPTION
+ The Python mapping of the Document Object Model is documented in the
+ Python Library Reference in the section on the xml.dom package.
+
+ This package contains the following modules:
+ ...
+ \end{verbatim}
+
+ \file{pydoc} quickly becomes addictive; try it out!
+
\item The \module{doctest} module provides a testing framework based
on running embedded examples in docstrings and comparing the results
***************
*** 550,557 ****
\item The PyXML package has gone through a few releases since Python
2.0, and Python 2.1 includes an updated version of the \module{xml}
! package. Some of the noteworthy changes include support for Expat
! 1.2, the ability for Expat parsers to handle files in any encoding
! supported by Python, and various bugfixes for SAX, DOM, and the
! \module{minidom} module.
\item Various functions in the \module{time} module, such as
--- 546,553 ----
\item The PyXML package has gone through a few releases since Python
2.0, and Python 2.1 includes an updated version of the \module{xml}
! package. Some of the noteworthy changes include support for Expat 1.2
! and later versions, the ability for Expat parsers to handle files in
! any encoding supported by Python, and various bugfixes for SAX, DOM,
! and the \module{minidom} module.
\item Various functions in the \module{time} module, such as
***************
*** 597,601 ****
%======================================================================
! \section{Minor Changes and Fixes}
There were relatively few smaller changes made in Python 2.1 due to
--- 593,597 ----
%======================================================================
! \section{Other Changes and Fixes}
There were relatively few smaller changes made in Python 2.1 due to
***************
*** 612,617 ****
to get large pools of memory, and then fulfills smaller memory
requests from these pools. It can be enabled by providing the
! "--with-pymalloc" option to the \filename{configure} script; see
! \filename{Objects/obmalloc.c} for the implementation details.
Contributed by Vladimir Marangozov.
--- 608,613 ----
to get large pools of memory, and then fulfills smaller memory
requests from these pools. It can be enabled by providing the
! "--with-pymalloc" option to the \file{configure} script; see
! \file{Objects/obmalloc.c} for the implementation details.
Contributed by Vladimir Marangozov.
***************
*** 691,697 ****
\end{itemize}
! And there's the usual list of bugfixes, minor memory leaks, docstring
! edits, and other tweaks, too lengthy to be worth itemizing; see the
! CVS logs for the full details if you want them.
--- 687,693 ----
\end{itemize}
! And there's the usual list of minor bugfixes, minor memory leaks,
! docstring edits, and other tweaks, too lengthy to be worth itemizing;
! see the CVS logs for the full details if you want them.
|