Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 81b6ae7

Browse files
committed
Create separate section for changes to the standard library
Make note about difflib and doctest Bump version number
1 parent 3e87656 commit 81b6ae7

1 file changed

Lines changed: 51 additions & 41 deletions

File tree

Doc/whatsnew/whatsnew21.tex

Lines changed: 51 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
\documentclass{howto}
22

3+
% XXX difflib.py, doctest.py added
4+
35
% $Id$
46

57
\title{What's New in Python 2.1}
6-
\release{0.05}
8+
\release{0.06}
79
\author{A.M. Kuchling}
810
\authoraddress{\email{[email protected]}}
911
\begin{document}
@@ -435,6 +437,54 @@ \section{PEP 208: New Coercion Model}
435437
436438
\end{seealso}
437439
440+
%======================================================================
441+
\section{New and Improved Modules}
442+
443+
\begin{itemize}
444+
445+
\item \module{curses.panel}, a wrapper for the panel library, part of
446+
ncurses and of SYSV curses, was contributed by Thomas Gellekum. The
447+
panel library provides windows with the additional feature of depth.
448+
Windows can be moved higher or lower in the depth ordering, and the
449+
panel library figures out where panels overlap and which sections are
450+
visible.
451+
452+
\item The PyXML package has gone through a few releases since Python
453+
2.0, and Python 2.1 includes an updated version of the \module{xml}
454+
package. Some of the noteworthy changes include support for Expat
455+
1.2, the ability for Expat parsers to handle files in any encoding
456+
supported by Python, and various bugfixes for SAX, DOM, and the
457+
\module{minidom} module.
458+
459+
\item Various functions in the \module{time} module, such as
460+
\function{asctime()} and \function{localtime()}, require a floating
461+
point argument containing the time in seconds since the epoch. The
462+
most common use of these functions is to work with the current time,
463+
so the floating point argument has been made optional; when a value
464+
isn't provided, the current time will be used. For example, log file
465+
entries usually need a string containing the current time; in Python
466+
2.1, \code{time.asctime()} can be used, instead of the lengthier
467+
\code{time.asctime(time.localtime(time.time()))} that was previously
468+
required.
469+
470+
This change was proposed and implemented by Thomas Wouters.
471+
472+
\item The \module{ftplib} module now defaults to retrieving files in
473+
passive mode, because passive mode is more likely to work from behind
474+
a firewall. This request came from the Debian bug tracking system,
475+
since other Debian packages use \module{ftplib} to retrieve files and
476+
then don't work from behind a firewall. It's deemed unlikely that
477+
this will cause problems for anyone, because Netscape defaults to
478+
passive mode and few people complain, but if passive mode is
479+
unsuitable for your application or network setup, call
480+
\method{set_pasv(0)} on FTP objects to disable passive mode.
481+
482+
\item Support for raw socket access has been added to the
483+
\module{socket} module, contributed by Grant Edwards.
484+
485+
486+
\end{itemize}
487+
438488
%======================================================================
439489
\section{Minor Changes and Fixes}
440490
@@ -480,13 +530,6 @@ \section{Minor Changes and Fixes}
480530
implemented mostly by Tim Peters and Guido van Rossum, after a
481531
suggestion and preliminary patch by Moshe Zadka.
482532
483-
\item \module{curses.panel}, a wrapper for the panel library, part of
484-
ncurses and of SYSV curses, was contributed by Thomas Gellekum. The
485-
panel library provides windows with the additional feature of depth.
486-
Windows can be moved higher or lower in the depth ordering, and the
487-
panel library figures out where panels overlap and which sections are
488-
visible.
489-
490533
\item Modules can now control which names are imported when \code{from
491534
\var{module} import *} is used, by defining an \code{__all__}
492535
attribute containing a list of names that will be imported. One
@@ -504,26 +547,6 @@ \section{Minor Changes and Fixes}
504547
by Ben Wolfson, but after some python-dev discussion, a weaker final
505548
version was checked in.
506549
507-
\item The PyXML package has gone through a few releases since Python
508-
2.0, and Python 2.1 includes an updated version of the \module{xml}
509-
package. Some of the noteworthy changes include support for Expat
510-
1.2, the ability for Expat parsers to handle files in any encoding
511-
supported by Python, and various bugfixes for SAX, DOM, and the
512-
\module{minidom} module.
513-
514-
\item Various functions in the \module{time} module, such as
515-
\function{asctime()} and \function{localtime()}, require a floating
516-
point argument containing the time in seconds since the epoch. The
517-
most common use of these functions is to work with the current time,
518-
so the floating point argument has been made optional; when a value
519-
isn't provided, the current time will be used. For example, log file
520-
entries usually need a string containing the current time; in Python
521-
2.1, \code{time.asctime()} can be used, instead of the lengthier
522-
\code{time.asctime(time.localtime(time.time()))} that was previously
523-
required.
524-
525-
This change was proposed and implemented by Thomas Wouters.
526-
527550
\item Applying \function{repr()} to strings previously used octal
528551
escapes for non-printable characters; for example, a newline was
529552
\code{'\e 012'}. This was a vestigial trace of Python's C ancestry, but
@@ -532,19 +555,6 @@ \section{Minor Changes and Fixes}
532555
\code{\e t}, \code{\e r} escapes for the appropriate characters, and
533556
implemented this new formatting.
534557
535-
\item The \module{ftplib} module now defaults to retrieving files in
536-
passive mode, because passive mode is more likely to work from behind
537-
a firewall. This request came from the Debian bug tracking system,
538-
since other Debian packages use \module{ftplib} to retrieve files and
539-
then don't work from behind a firewall. It's deemed unlikely that
540-
this will cause problems for anyone, because Netscape defaults to
541-
passive mode and few people complain, but if passive mode is
542-
unsuitable for your application or network setup, call
543-
\method{set_pasv(0)} on FTP objects to disable passive mode.
544-
545-
\item Support for raw socket access has been added to the
546-
\module{socket} module, contributed by Grant Edwards.
547-
548558
\item Syntax errors detected at compile-time can now raise exceptions
549559
containing the filename and line number of the error, a pleasant side
550560
effect of the compiler reorganization done by Jeremy Hylton.

0 commit comments

Comments
 (0)