[Python-checkins] python/dist/src/Doc/whatsnew whatsnew23.tex,1.153,1.154
akuchling@users.sourceforge.net
akuchling@users.sourceforge.net
Wed, 16 Jul 2003 13:37:28 -0700
Update of /cvsroot/python/python/dist/src/Doc/whatsnew
In directory sc8-pr-cvs1:/tmp/cvs-serv14535
Modified Files:
whatsnew23.tex
Log Message:
Mention list.index; more small textual changes
Index: whatsnew23.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew23.tex,v
retrieving revision 1.153
retrieving revision 1.154
diff -C2 -d -r1.153 -r1.154
*** whatsnew23.tex 16 Jul 2003 20:12:33 -0000 1.153
--- whatsnew23.tex 16 Jul 2003 20:37:26 -0000 1.154
***************
*** 14,18 ****
% To do:
% PYTHONINSPECT
- % list.index
% file.encoding
% doctest extensions
--- 14,17 ----
***************
*** 425,434 ****
A standard package for writing logs, \module{logging}, has been added
to Python 2.3. It provides a powerful and flexible mechanism for
! components to generate logging output which can then be filtered and
! processed in various ways. A standard configuration file format can
! be used to control the logging behavior of a program. Python's
! standard library includes handlers that will write log records to
standard error or to a file or socket, send them to the system log, or
! even e-mail them to a particular address, and of course it's also
possible to write your own handler classes.
--- 424,433 ----
A standard package for writing logs, \module{logging}, has been added
to Python 2.3. It provides a powerful and flexible mechanism for
! generating logging output which can then be filtered and processed in
! various ways. A configuration file written in a standard format can
! be used to control the logging behavior of a program. Python
! includes handlers that will write log records to
standard error or to a file or socket, send them to the system log, or
! even e-mail them to a particular address; of course, it's also
possible to write your own handler classes.
***************
*** 470,474 ****
In the default configuration, informational and debugging messages are
suppressed and the output is sent to standard error. You can enable
! the display of information and debugging messages by calling the
\method{setLevel()} method on the root logger.
--- 469,473 ----
In the default configuration, informational and debugging messages are
suppressed and the output is sent to standard error. You can enable
! the display of informational and debugging messages by calling the
\method{setLevel()} method on the root logger.
***************
*** 554,558 ****
\constant{False}. (\constant{True} and
\constant{False} constants were added to the built-ins
! in Python 2.2.1, but the 2.2.1 versions simply have integer values of
1 and 0 and aren't a different type.)
--- 553,557 ----
\constant{False}. (\constant{True} and
\constant{False} constants were added to the built-ins
! in Python 2.2.1, but the 2.2.1 versions are simply set to integer values of
1 and 0 and aren't a different type.)
***************
*** 597,604 ****
prevent you performing arithmetic with Booleans, and would require
that the expression in an \keyword{if} statement always evaluate to a
! Boolean. Python is not this strict, and it never will be, as
\pep{285} explicitly says. This means you can still use any
expression in an \keyword{if} statement, even ones that evaluate to a
! list or tuple or some random object, and the Boolean type is a
subclass of the \class{int} class so that arithmetic using a Boolean
still works.
--- 596,603 ----
prevent you performing arithmetic with Booleans, and would require
that the expression in an \keyword{if} statement always evaluate to a
! Boolean result. Python is not this strict and never will be, as
\pep{285} explicitly says. This means you can still use any
expression in an \keyword{if} statement, even ones that evaluate to a
! list or tuple or some random object. The Boolean type is a
subclass of the \class{int} class so that arithmetic using a Boolean
still works.
***************
*** 643,647 ****
Python now has a flexible framework to add different processing
strategies. New error handlers can be added with
! \function{codecs.register_error}. Codecs then can access the error
handler with \function{codecs.lookup_error}. An equivalent C API has
been added for codecs written in C. The error handler gets the
--- 642,646 ----
Python now has a flexible framework to add different processing
strategies. New error handlers can be added with
! \function{codecs.register_error}, and codecs then can access the error
handler with \function{codecs.lookup_error}. An equivalent C API has
been added for codecs written in C. The error handler gets the
***************
*** 681,685 ****
8467 1 file
amk@nyman:~/src/python$ ./python
! Python 2.3a0 (#1, Dec 30 2002, 19:54:32)
>>> import sys
>>> sys.path.insert(0, '/tmp/example.zip') # Add .zip file to front of path
--- 680,684 ----
8467 1 file
amk@nyman:~/src/python$ ./python
! Python 2.3 (#1, Aug 1 2003, 19:54:32)
>>> import sys
>>> sys.path.insert(0, '/tmp/example.zip') # Add .zip file to front of path
***************
*** 722,730 ****
appearance in 2.3.
! The core component is the new Distutils \command{register} command.
Running \code{python setup.py register} will collect the metadata
describing a package, such as its name, version, maintainer,
description, \&c., and send it to a central catalog server. The
! catalog is available from \url{http://www.python.org/pypi}.
To make the catalog a bit more useful, a new optional
--- 721,729 ----
appearance in 2.3.
! The heart of the catalog is the new Distutils \command{register} command.
Running \code{python setup.py register} will collect the metadata
describing a package, such as its name, version, maintainer,
description, \&c., and send it to a central catalog server. The
! resulting catalog is available from \url{http://www.python.org/pypi}.
To make the catalog a bit more useful, a new optional
***************
*** 846,850 ****
from databases and spreadsheets. Python 2.3 adds a parser for
comma-separated files.
! The format is deceptively simple at first glance:
\begin{verbatim}
--- 845,850 ----
from databases and spreadsheets. Python 2.3 adds a parser for
comma-separated files.
!
! Comma-separated format is deceptively simple at first glance:
\begin{verbatim}
***************
*** 877,881 ****
Different dialects of comma-separated files can be defined and
! registered; currently there are two, both for Microsoft Excel.
A separate \class{csv.writer} class will generate comma-separated files
from a succession of tuples or lists, quoting strings that contain the
--- 877,881 ----
Different dialects of comma-separated files can be defined and
! registered; currently there are two dialects, both used by Microsoft Excel.
A separate \class{csv.writer} class will generate comma-separated files
from a succession of tuples or lists, quoting strings that contain the
***************
*** 903,910 ****
\function{pickle.dumps()} function has supported a text-or-binary flag
for a long time. In 2.3, this flag is redefined from a Boolean to an
! integer; 0 is the old text-mode pickle format, 1 is the old binary
! format, and now 2 is a new 2.3-specific format. (A new constant,
\constant{pickle.HIGHEST_PROTOCOL}, can be used to select the fanciest
! protocol available.)
Unpickling is no longer considered a safe operation. 2.2's
--- 903,910 ----
\function{pickle.dumps()} function has supported a text-or-binary flag
for a long time. In 2.3, this flag is redefined from a Boolean to an
! integer: 0 is the old text-mode pickle format, 1 is the old binary
! format, and now 2 is a new 2.3-specific format. A new constant,
\constant{pickle.HIGHEST_PROTOCOL}, can be used to select the fanciest
! protocol available.
Unpickling is no longer considered a safe operation. 2.2's
***************
*** 943,947 ****
the developers of Numerical Python, which uses the third argument
extensively. However, Python's built-in list, tuple, and string
! sequence types have never supported this feature, and you got a
\exception{TypeError} if you tried it. Michael Hudson contributed a
patch to fix this shortcoming.
--- 943,947 ----
the developers of Numerical Python, which uses the third argument
extensively. However, Python's built-in list, tuple, and string
! sequence types have never supported this feature, raising a
\exception{TypeError} if you tried it. Michael Hudson contributed a
patch to fix this shortcoming.
***************
*** 989,993 ****
Extended slices aren't this flexible. When assigning to an extended
! slice the list on the right hand side of the statement must contain
the same number of items as the slice it is replacing:
--- 989,993 ----
Extended slices aren't this flexible. When assigning to an extended
! slice, the list on the right hand side of the statement must contain
the same number of items as the slice it is replacing:
***************
*** 1095,1099 ****
adds up the numeric items in the iterable object and returns their sum.
\function{sum()} only accepts numbers, meaning that you can't use it
! to concatenate a bunch of strings, for example. (Contributed by Alex
Martelli.)
--- 1095,1099 ----
adds up the numeric items in the iterable object and returns their sum.
\function{sum()} only accepts numbers, meaning that you can't use it
! to concatenate a bunch of strings. (Contributed by Alex
Martelli.)
***************
*** 1104,1107 ****
--- 1104,1112 ----
before the last element, and so forth.
+ \item \code{list.index(\var{value})}, which searches for \var{value}
+ within the list and returns its index, now takes optional
+ \var{start} and \var{stop} arguments to limit the search to
+ only part of the list.
+
\item Dictionaries have a new method, \method{pop(\var{key}\optional{,
\var{default}})}, that returns the value corresponding to \var{key}
***************
*** 1187,1192 ****
\item The method resolution order used by new-style classes has
changed, though you'll only notice the difference if you have a really
! complicated inheritance hierarchy. (Classic classes are unaffected by
! this change.) Python 2.2 originally used a topological sort of a
class's ancestors, but 2.3 now uses the C3 algorithm as described in
the paper \ulink{``A Monotonic Superclass Linearization for
--- 1192,1197 ----
\item The method resolution order used by new-style classes has
changed, though you'll only notice the difference if you have a really
! complicated inheritance hierarchy. Classic classes are unaffected by
! this change. Python 2.2 originally used a topological sort of a
class's ancestors, but 2.3 now uses the C3 algorithm as described in
the paper \ulink{``A Monotonic Superclass Linearization for
***************
*** 1262,1267 ****
Note that this doesn't tell you where the substring starts; if you
! need that information, you must use the \method{find()} method
! instead.
\item The \method{strip()}, \method{lstrip()}, and \method{rstrip()}
--- 1267,1271 ----
Note that this doesn't tell you where the substring starts; if you
! need that information, use the \method{find()} string method.
\item The \method{strip()}, \method{lstrip()}, and \method{rstrip()}