diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/functions.rst | 10 | ||||
-rw-r--r-- | Doc/whatsnew/2.6.rst | 90 |
2 files changed, 85 insertions, 15 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 582abbf..def6ae6 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -325,15 +325,15 @@ are always available. They are listed here in alphabetical order. < abs(b)``. -.. function:: enumerate(sequence) +.. function:: enumerate(sequence[, start=0]) Return an enumerate object. *sequence* must be a sequence, an :term:`iterator`, or some other object which supports iteration. The :meth:`__next__` method of the iterator returned by :func:`enumerate` returns a - tuple containing a count (from zero) and the corresponding value obtained - from iterating over *iterable*. :func:`enumerate` is useful for obtaining an - indexed series: ``(0, seq[0])``, ``(1, seq[1])``, ``(2, seq[2])``, .... For - example: + tuple containing a count (from *start* which defaults to 0) and the + corresponding value obtained from iterating over *iterable*. + :func:`enumerate` is useful for obtaining an indexed series: ``(0, seq[0])``, + ``(1, seq[1])``, ``(2, seq[2])``, .... For example: >>> for i, season in enumerate(['Spring', 'Summer', 'Fall', 'Winter')]: ... print(i, season) diff --git a/Doc/whatsnew/2.6.rst b/Doc/whatsnew/2.6.rst index c39c80a..31ea41d 100644 --- a/Doc/whatsnew/2.6.rst +++ b/Doc/whatsnew/2.6.rst @@ -1466,13 +1466,86 @@ New, Improved, and Deprecated Modules As usual, Python's standard library received a number of enhancements and bug fixes. Here's a partial list of the most notable changes, sorted alphabetically by module name. Consult the :file:`Misc/NEWS` file in the source tree for a more -complete list of changes, or look through the CVS logs for all the details. - -* (3.0-warning mode) The :mod:`audiodev` module is being deprecated, - and has been removed from Python 3.0, so importing it now triggers a - warning. The module hasn't been maintained for several versions, - and is written against an outdated sound interface for SunOS and - IRIX. +complete list of changes, or look through the Subversion logs for all the +details. + +* (3.0-warning mode) Python 3.0 will feature a reorganized standard + library; many outdated modules are being dropped, + and some modules are being renamed or moved into packages. + Python 2.6 running in 3.0-warning mode will warn about these modules + when they are imported. + The list of deprecated modules is: + :mod:`_builtinSuites`, + :mod:`aepack`, + :mod:`aetools`, + :mod:`aetypes`, + :mod:`applesingle`, + :mod:`appletrawmain`, + :mod:`appletrunner`, + :mod:`argvemulator`, + :mod:`Audio_mac`, + :mod:`audiodev`, + :mod:`autoGIL`, + :mod:`bgenlocations`, + :mod:`buildtools`, + :mod:`bundlebuilder`, + :mod:`Canvas`, + :mod:`Carbon`, + :mod:`cfmfile`, + :mod:`CodeWarrior`, + :mod:`ColorPicker`, + :mod:`compiler`, + :mod:`cd`, + :mod:`cddb`, + :mod:`cdplayer`, + :mod:`CL` and :mod:`cl`, + :mod:`cd`, + :mod:`cd`, + :mod:`dircache`, + :mod:`dl`, + :mod:`EasyDialogs`, + :mod:`Explorer`, + :mod:`Finder`, + :mod:`FrameWork`, + :mod:`findertools`, + :mod:`fpformat`, + :mod:`gensuitemodule`, + :mod:`ic`, + :mod:`icglue`, + :mod:`icopen`, + :mod:`ihooks`, + :mod:`imageop`, + :mod:`linuxaudiodev`, + :mod:`macerrors`, + :mod:`MacOS`, + :mod:`macostools`, + :mod:`macresource`, + :mod:`mhlib`, + :mod:`MiniAEFrame`, + :mod:`multifile`, + :mod:`Nav`, + :mod:`Netscape`, + :mod:`new`, + :mod:`OSATerminology`, + :mod:`pimp`, + :mod:`PixMapWrapper`, + :mod:`popen2`, + :mod:`pure`, + :mod:`StdSuites`, + :mod:`sv`, + :mod:`SystemEvents`, + :mod:`Terminal`, + :mod:`terminalcommand`, + :mod:`test.testall`, + :mod:`toaiff`, + :mod:`videoreader`. + + The modules that have been renamed are: + + * :mod:`ConfigParser` has become :mod:`configparser`. + * :mod:`copy_reg` has become :mod:`copyreg`. + * :mod:`SocketServer` has become :mod:`socketserver`. + * :mod:`Queue` has become :mod:`queue`. * The :mod:`bsddb.dbshelve` module now uses the highest pickling protocol available, instead of restricting itself to protocol 1. @@ -1755,9 +1828,6 @@ complete list of changes, or look through the CVS logs for all the details. the forward search. (Contributed by John Lenton.) -* (3.0-warning mode) The :mod:`new` module has been removed from - Python 3.0. Importing it therefore triggers a warning message. - * The :mod:`operator` module gained a :func:`methodcaller` function that takes a name and an optional set of arguments, returning a callable that will call |