rest25/whatsnew/2.0.rst => rest262/whatsnew/2.0.rst
f1****************************
n2-  What's New in Python 2.0  
n2+  What's New in Python 2.0
3****************************
4
5:Author: A.M. Kuchling and Moshe Zadka
6
7.. |release| replace:: 1.02
8
n9-.. % $Id: whatsnew20.tex 50964 2006-07-30 03:03:43Z fred.drake $
n9+.. $Id: whatsnew20.tex 50964 2006-07-30 03:03:43Z fred.drake $
10
11
12Introduction
13============
14
15A new release of Python, version 2.0, was released on October 16, 2000. This
16article covers the exciting new features in 2.0, highlights some other useful
17changes, and points out a few incompatible changes that may require rewriting
21of bug fixes and improvements are always being submitted. A host of minor fixes,
22a few optimizations, additional docstrings, and better error messages went into
232.0; to list them all would be impossible, but they're certainly significant.
24Consult the publicly-available CVS logs if you want to see the full list.  This
25progress is due to the five developers working for  PythonLabs are now getting
26paid to spend their days fixing bugs, and also due to the improved communication
27resulting  from moving to SourceForge.
28
n29-.. % ======================================================================
n29+.. ======================================================================
30
31
32What About Python 1.6?
33======================
34
35Python 1.6 can be thought of as the Contractual Obligations Python release.
36After the core development team left CNRI in May 2000, CNRI requested that a 1.6
37release be created, containing all the work on Python that had been performed at
45and 2.0beta1 releases were made on the same day (September 5, 2000), the plan
46being to finalize Python 2.0 within a month or so.  If you have applications to
47maintain, there seems little point in breaking things by moving to 1.6, fixing
48them, and then having another round of breakage within a month by moving to 2.0;
49you're better off just going straight to 2.0.  Most of the really interesting
50features described in this document are only in 2.0, because a lot of work was
51done between May and September.
52
n53-.. % ======================================================================
n53+.. ======================================================================
54
55
56New Development Process
57=======================
58
59The most important change in Python 2.0 may not be to the code at all, but to
60how Python is developed: in May 2000 the Python developers began using the tools
61made available by SourceForge for storing  source code, tracking bug reports,
62and managing the queue of patch submissions.  To report bugs or submit patches
63for Python 2.0, use the bug tracking and patch manager tools available from
n64-Python's project page, located at `<http://sourceforge.net/projects/python/>`_.
n64+Python's project page, located at http://sourceforge.net/projects/python/.
65
66The most important of the services now hosted at SourceForge is the Python CVS
67tree, the version-controlled repository containing the source code for Python.
68Previously, there were roughly 7 or so people who had write access to the CVS
69tree, and all patches had to be inspected and checked in by one of the people on
70this short list. Obviously, this wasn't very scalable.  By moving the CVS tree
71to SourceForge, it became possible to grant write access to more people; as of
72September 2000 there were 27 people able to check in changes, a fourfold
125   We intend PEPs to be the primary mechanisms for proposing new features, for
126   collecting community input on an issue, and for documenting the design decisions
127   that have gone into Python.  The PEP author is responsible for building
128   consensus within the community and documenting dissenting opinions.
129
130Read the rest of PEP 1 for the details of the PEP editorial process, style, and
131format.  PEPs are kept in the Python CVS tree on SourceForge, though they're not
132part of the Python 2.0 distribution, and are also available in HTML form from
n133-`<http://www.python.org/peps/>`_.  As of September 2000, there are 25 PEPS,
n133+http://www.python.org/peps/.  As of September 2000, there are 25 PEPS, ranging
134-ranging from PEP 201, "Lockstep Iteration", to PEP 225, "Elementwise/Objectwise
134+from PEP 201, "Lockstep Iteration", to PEP 225, "Elementwise/Objectwise
135Operators".
136
n137-.. % ======================================================================
n137+.. ======================================================================
138
139
140Unicode
141=======
142
143The largest new feature in Python 2.0 is a new fundamental data type: Unicode
144strings.  Unicode uses 16-bit numbers to represent characters instead of the
1458-bit number used by ASCII, meaning that 65,536 distinct characters can be
155In Python source code, Unicode strings are written as ``u"string"``.  Arbitrary
156Unicode characters can be written using a new escape sequence, ``\uHHHH``, where
157*HHHH* is a 4-digit hexadecimal number from 0000 to FFFF.  The existing
158``\xHHHH`` escape sequence can also be used, and octal escapes can be used for
159characters up to U+01FF, which is represented by ``\777``.
160
161Unicode strings, just like regular strings, are an immutable sequence type.
162They can be indexed and sliced, but not modified in place. Unicode strings have
n163-an :meth:`encode( [encoding] )` method that returns an 8-bit string in the
n163+an ``encode( [encoding] )`` method that returns an 8-bit string in the desired
164-desired encoding.  Encodings are named by strings, such as ``'ascii'``,
164+encoding.  Encodings are named by strings, such as ``'ascii'``, ``'utf-8'``,
165-``'utf-8'``, ``'iso-8859-1'``, or whatever.  A codec API is defined for
165+``'iso-8859-1'``, or whatever.  A codec API is defined for implementing and
166-implementing and registering new encodings that are then available throughout a
166+registering new encodings that are then available throughout a Python program.
167-Python program.  If an encoding isn't specified, the default encoding is usually
167+If an encoding isn't specified, the default encoding is usually 7-bit ASCII,
168-7-bit ASCII, though it can be changed for your Python installation by calling
168+though it can be changed for your Python installation by calling the
169-the :func:`sys.setdefaultencoding(encoding)` function in a customised version of
169+:func:`sys.setdefaultencoding(encoding)` function in a customised version of
170:file:`site.py`.
171
172Combining 8-bit and Unicode strings always coerces to Unicode, using the default
173ASCII encoding; the result of ``'a' + u'bc'`` is ``u'abc'``.
174
175New built-in functions have been added, and existing built-ins modified to
176support Unicode:
177
178* ``unichr(ch)`` returns a Unicode string 1 character long, containing the
179  character *ch*.
180
181* ``ord(u)``, where *u* is a 1-character regular or Unicode string, returns the
182  number of the character as an integer.
183
n184-* ``unicode(string [, *encoding*]  [, *errors*] )`` creates a Unicode string
n184+* ``unicode(string [, encoding]  [, errors] )`` creates a Unicode string
185  from an 8-bit string.  ``encoding`` is a string naming the encoding to use. The
186  ``errors`` parameter specifies the treatment of characters that are invalid for
187  the current encoding; passing ``'strict'`` as the value causes an exception to
188  be raised on any encoding error, while ``'ignore'`` causes errors to be silently
189  ignored and ``'replace'`` uses U+FFFD, the official replacement character, in
190  case of any problems.
191
192* The :keyword:`exec` statement, and various built-ins such as ``eval()``,
250which has a new underlying implementation called SRE written by Fredrik Lundh of
251Secret Labs AB.
252
253A ``-U`` command line option was added which causes the Python compiler to
254interpret all string literals as Unicode string literals. This is intended to be
255used in testing and future-proofing your Python code, since some future version
256of Python may drop support for 8-bit strings and provide only Unicode strings.
257
n258-.. % ======================================================================
n258+.. ======================================================================
259
260
261List Comprehensions
262===================
263
264Lists are a workhorse data type in Python, and many programs manipulate a list
265at some point.  Two common operations on lists are to loop over them, and either
266pick out the elements that meet a certain criterion, or apply some function to
272purpose, but they require a function as one of their arguments.  This is fine if
273there's an existing built-in function that can be passed directly, but if there
274isn't, you have to create a little function to do the required work, and
275Python's scoping rules make the result ugly if the little function needs
276additional information.  Take the first example in the previous paragraph,
277finding all the strings in the list containing a given substring.  You could
278write the following to do it::
279
n280-   # Given the list L, make a list of all strings 
n280+   # Given the list L, make a list of all strings
281   # containing the substring S.
n282-   sublist = filter( lambda s, substring=S: 
n282+   sublist = filter( lambda s, substring=S:
283                        string.find(s, substring) != -1,
n284-                  L)
n284+                     L)
285
286Because of Python's scoping rules, a default argument is used so that the
287anonymous function created by the :keyword:`lambda` statement knows what
288substring is being searched for.  List comprehensions make this cleaner::
289
290   sublist = [ s for s in L if string.find(s, S) != -1 ]
291
292List comprehensions have the form::
293
n294-   [ expression for expr in sequence1 
n294+   [ expression for expr in sequence1
295                for expr2 in sequence2 ...
n296-             for exprN in sequenceN
n296+                for exprN in sequenceN
297                if condition ]
298
299The :keyword:`for`...\ :keyword:`in` clauses contain the sequences to be
300iterated over.  The sequences do not have to be the same length, because they
301are *not* iterated over in parallel, but from left to right; this is explained
302more clearly in the following paragraphs.  The elements of the generated list
303will be the successive values of *expression*.  The final :keyword:`if` clause
304is optional; if present, *expression* is only evaluated and added to the result
307To make the semantics very clear, a list comprehension is equivalent to the
308following Python code::
309
310   for expr1 in sequence1:
311       for expr2 in sequence2:
312       ...
313           for exprN in sequenceN:
314                if (condition):
n315-                     # Append the value of 
n315+                     # Append the value of
316-                     # the expression to the 
316+                     # the expression to the
317                     # resulting list.
318
319This means that when there are multiple :keyword:`for`...\ :keyword:`in`
320clauses, the resulting list will be equal to the product of the lengths of all
321the sequences.  If you have two lists of length 3, the output list is 9 elements
322long::
323
324   seq1 = 'abc'
332comprehension below is a syntax error, while the second one is correct::
333
334   # Syntax error
335   [ x,y for x in seq1 for y in seq2]
336   # Correct
337   [ (x,y) for x in seq1 for y in seq2]
338
339The idea of list comprehensions originally comes from the functional programming
n340-language Haskell (`<http://www.haskell.org>`_).  Greg Ewing argued most
n340+language Haskell (http://www.haskell.org).  Greg Ewing argued most effectively
341-effectively for adding them to Python and wrote the initial list comprehension
341+for adding them to Python and wrote the initial list comprehension patch, which
342-patch, which was then discussed for a seemingly endless time on the python-dev
342+was then discussed for a seemingly endless time on the python-dev mailing list
343-mailing list and kept up-to-date by Skip Montanaro.
343+and kept up-to-date by Skip Montanaro.
344
n345-.. % ======================================================================
n345+.. ======================================================================
346
347
348Augmented Assignment
349====================
350
351Augmented assignment operators, another long-requested feature, have been added
352to Python 2.0.  Augmented assignment operators include ``+=``, ``-=``, ``*=``,
353and so forth.  For example, the statement ``a += 2`` increments the value of the
355
356The full list of supported assignment operators is ``+=``, ``-=``, ``*=``,
357``/=``, ``%=``, ``**=``, ``&=``, ``|=``, ``^=``, ``>>=``, and ``<<=``.  Python
358classes can override the augmented assignment operators by defining methods
359named :meth:`__iadd__`, :meth:`__isub__`, etc.  For example, the following
360:class:`Number` class stores a number and supports using += to create a new
361instance with an incremented value.
362
n363-.. % The empty groups below prevent conversion to guillemets.
n363+.. The empty groups below prevent conversion to guillemets.
364
365::
366
367   class Number:
368       def __init__(self, value):
369           self.value = value
370       def __iadd__(self, increment):
n371-        return Number( self.value + increment)
n371+           return Number( self.value + increment)
372
373   n = Number(5)
374   n += 3
375   print n.value
376
377The :meth:`__iadd__` special method is called with the value of the increment,
378and should return a new instance with an appropriately modified value; this
379return value is bound as the new value of the variable on the left-hand side.
380
381Augmented assignment operators were first introduced in the C programming
382language, and most C-derived languages, such as :program:`awk`, C++, Java, Perl,
383and PHP also support them.  The augmented assignment patch was implemented by
384Thomas Wouters.
385
n386-.. % ======================================================================
n386+.. ======================================================================
387
388
389String Methods
390==============
391
392Until now string-manipulation functionality was in the :mod:`string` module,
393which was usually a front-end for the :mod:`strop` module written in C.  The
394addition of Unicode posed a difficulty for the :mod:`strop` module, because the
421``s.endswith(t)`` is equivalent to ``s[-len(t):] == t``.
422
423One other method which deserves special mention is :meth:`join`.  The
424:meth:`join` method of a string receives one parameter, a sequence of strings,
425and is equivalent to the :func:`string.join` function from the old :mod:`string`
426module, with the arguments reversed. In other words, ``s.join(seq)`` is
427equivalent to the old ``string.join(seq, s)``.
428
n429-.. % ======================================================================
n429+.. ======================================================================
430
431
432Garbage Collection of Cycles
433============================
434
435The C implementation of Python uses reference counting to implement garbage
436collection.  Every Python object maintains a count of the number of references
437pointing to itself, and adjusts the count as references are created or
483implementation of the cycle detection approach was written by Toby Kelsey.  The
484current algorithm was suggested by Eric Tiedemann during a visit to CNRI, and
485Guido van Rossum and Neil Schemenauer wrote two different implementations, which
486were later integrated by Neil.  Lots of other people offered suggestions along
487the way; the March 2000 archives of the python-dev mailing list contain most of
488the relevant discussion, especially in the threads titled "Reference cycle
489collection for Python" and "Finalization again".
490
n491-.. % ======================================================================
n491+.. ======================================================================
492
493
494Other Core Changes
495==================
496
497Various minor changes have been made to Python's syntax and built-in functions.
498None of the changes are very far-reaching, but they're handy conveniences.
499
560are isomorphic. See the thread "trashcan and PR#7" in the April 2000 archives of
561the python-dev mailing list for the discussion leading up to this
562implementation, and some useful relevant links.    Note that comparisons can now
563also raise exceptions. In earlier versions of Python, a comparison operation
564such as ``cmp(a,b)`` would always produce an answer, even if a user-defined
565:meth:`__cmp__` method encountered an error, since the resulting exception would
566simply be silently swallowed.
567
n568-.. % Starting URL:
n568+.. Starting URL:
569-.. % http://www.python.org/pipermail/python-dev/2000-April/004834.html
569+.. http://www.python.org/pipermail/python-dev/2000-April/004834.html
570
571Work has been done on porting Python to 64-bit Windows on the Itanium processor,
572mostly by Trent Mick of ActiveState.  (Confusingly, ``sys.platform`` is still
573``'win32'`` on Win64 because it seems that for ease of porting, MS Visual C++
574treats code as 32 bit on Itanium.) PythonWin also supports Windows CE; see the
n575-Python CE page at `<http://starship.python.net/crew/mhammond/ce/>`_ for more
n575+Python CE page at http://starship.python.net/crew/mhammond/ce/ for more
576information.
577
578Another new platform is Darwin/MacOS X; initial support for it is in Python 2.0.
579Dynamic loading works, if you specify "configure --with-dyld --with-suffix=.x".
580Consult the README in the Python source distribution for more instructions.
581
582An attempt has been made to alleviate one of Python's warts, the often-confusing
583:exc:`NameError` exception when code refers to a local variable before the
585exception on the :keyword:`print` statement in both 1.5.2 and 2.0; in 1.5.2 a
586:exc:`NameError` exception is raised, while 2.0 raises a new
587:exc:`UnboundLocalError` exception. :exc:`UnboundLocalError` is a subclass of
588:exc:`NameError`, so any existing code that expects :exc:`NameError` to be
589raised should still work. ::
590
591   def f():
592       print "i=",i
n593-       i = i + 1 
n593+       i = i + 1
594   f()
595
596Two new exceptions, :exc:`TabError` and :exc:`IndentationError`, have been
597introduced.  They're both subclasses of :exc:`SyntaxError`, and are raised when
598Python code is found to be improperly indented.
599
600
601Changes to Built-in Functions
622
623Dictionaries have an odd new method, :meth:`setdefault(key, default)`, which
624behaves similarly to the existing :meth:`get` method.  However, if the key is
625missing, :meth:`setdefault` both returns the value of *default* as :meth:`get`
626would do, and also inserts it into the dictionary as the value for *key*.  Thus,
627the following lines of code::
628
629   if dict.has_key( key ): return dict[key]
n630-   else: 
n630+   else:
631       dict[key] = []
632       return dict[key]
633
634can be reduced to a single ``return dict.setdefault(key, [])`` statement.
635
636The interpreter sets a maximum recursion depth in order to catch runaway
637recursion before filling the C stack and causing a core dump or GPF..
638Previously this limit was fixed when you compiled Python, but in 2.0 the maximum
639recursion depth can be read and modified using :func:`sys.getrecursionlimit` and
640:func:`sys.setrecursionlimit`. The default value is 1000, and a rough maximum
641value for a given platform can be found by running a new script,
642:file:`Misc/find_recursionlimit.py`.
643
n644-.. % ======================================================================
n644+.. ======================================================================
645
646
647Porting to 2.0
648==============
649
650New Python releases try hard to be compatible with previous releases, and the
651record has been pretty good.  However, some changes are considered useful
652enough, usually because they fix initial design decisions that turned out to be
723``'8.1'``.
724
725The ``-X`` command-line option, which turned all standard exceptions into
726strings instead of classes, has been removed; the standard exceptions will now
727always be classes.  The :mod:`exceptions` module containing the standard
728exceptions was translated from Python to a built-in C module, written by Barry
729Warsaw and Fredrik Lundh.
730
n731-.. % Commented out for now -- I don't think anyone will care.
n731+.. Commented out for now -- I don't think anyone will care.
732-.. % The pattern and match objects provided by SRE are C types, not Python
732+   The pattern and match objects provided by SRE are C types, not Python
733-.. % class instances as in 1.5.  This means you can no longer inherit from
733+   class instances as in 1.5.  This means you can no longer inherit from
734-.. % \class{RegexObject} or \class{MatchObject}, but that shouldn't be much
734+   \class{RegexObject} or \class{MatchObject}, but that shouldn't be much
735-.. % of a problem since no one should have been doing that in the first
735+   of a problem since no one should have been doing that in the first
736-.. % place.
736+   place.
737-.. % ======================================================================
737+.. ======================================================================
738
739
740Extending/Embedding Changes
741===========================
742
743Some of the changes are under the covers, and will only be apparent to people
744writing C extension modules or embedding a Python interpreter in a larger
745application.  If you aren't dealing with Python's C API, you can safely skip
800of these functions takes a module object, a null-terminated C string containing
801the name to be added, and a third argument for the value to be assigned to the
802name.  This third argument is, respectively, a Python object, a C long, or a C
803string.
804
805A wrapper API was added for Unix-style signal handlers. :func:`PyOS_getsig` gets
806a signal handler and :func:`PyOS_setsig` will set a new handler.
807
n808-.. % ======================================================================
n808+.. ======================================================================
809
810
811Distutils: Making Modules Easy to Install
812=========================================
813
814Before Python 2.0, installing modules was a tedious affair -- there was no way
815to figure out automatically where Python is installed, or what compiler options
816to use for extension modules.  Software authors had to go through an arduous
831places to override defaults -- separating the build from the install, building
832or installing in non-default directories, and more.
833
834In order to use the Distutils, you need to write a :file:`setup.py` script.  For
835the simple case, when the software contains only .py files, a minimal
836:file:`setup.py` can be just a few lines long::
837
838   from distutils.core import setup
n839-   setup (name = "foo", version = "1.0", 
n839+   setup (name = "foo", version = "1.0",
840          py_modules = ["module1", "module2"])
841
842The :file:`setup.py` file isn't much more complicated if the software consists
843of a few packages::
844
845   from distutils.core import setup
n846-   setup (name = "foo", version = "1.0", 
n846+   setup (name = "foo", version = "1.0",
847          packages = ["package", "package.subpackage"])
848
849A C extension can be the most complicated case; here's an example taken from
850the PyXML package::
851
852   from distutils.core import setup, Extension
853
854   expat_extension = Extension('xml.parsers.pyexpat',
n855-        define_macros = [('XML_NS', None)],
n855+        define_macros = [('XML_NS', None)],
856-        include_dirs = [ 'extensions/expat/xmltok',
856+        include_dirs = [ 'extensions/expat/xmltok',
857-                         'extensions/expat/xmlparse' ],
857+                         'extensions/expat/xmlparse' ],
858-        sources = [ 'extensions/pyexpat.c',
858+        sources = [ 'extensions/pyexpat.c',
859-                    'extensions/expat/xmltok/xmltok.c',
859+                    'extensions/expat/xmltok/xmltok.c',
860-                    'extensions/expat/xmltok/xmlrole.c',
860+                    'extensions/expat/xmltok/xmlrole.c', ]
861-                     ]
862          )
n863-   setup (name = "PyXML", version = "0.5.4", 
n862+   setup (name = "PyXML", version = "0.5.4",
864          ext_modules =[ expat_extension ] )
865
866The Distutils can also take care of creating source and binary distributions.
867The "sdist" command, run by "``python setup.py sdist``', builds a source
868distribution such as :file:`foo-1.0.tar.gz`. Adding new commands isn't
869difficult, "bdist_rpm" and "bdist_wininst" commands have already been
870contributed to create an RPM distribution and a Windows installer for the
871software, respectively.  Commands to create other distribution formats such as
872Debian packages and Solaris :file:`.pkg` files are in various stages of
873development.
874
875All this is documented in a new manual, *Distributing Python Modules*, that
876joins the basic set of Python documentation.
877
n878-.. % ======================================================================
n877+.. ======================================================================
879
880
881XML Modules
882===========
883
884Python 1.5.2 included a simple XML parser in the form of the :mod:`xmllib`
885module, contributed by Sjoerd Mullender.  Since 1.5.2's release, two different
886interfaces for processing XML have become common: SAX2 (version 2 of the Simple
930   # Tell it what handler to use
931   handler = SimpleHandler()
932   parser.setContentHandler( handler )
933
934   # Parse a file!
935   parser.parse( 'hamlet.xml' )
936
937For more information, consult the Python documentation, or the XML HOWTO at
n938-`<http://pyxml.sourceforge.net/topics/howto/xml-howto.html>`_.
n937+http://pyxml.sourceforge.net/topics/howto/xml-howto.html.
939
940
941DOM Support
942-----------
943
944The Document Object Model is a tree-based representation for an XML document.  A
945top-level :class:`Document` instance is the root of the tree, and has a single
946child which is the top-level :class:`Element` instance. This :class:`Element`
1000the different :class:`Node` classes and their various methods.
1001
1002
1003Relationship to PyXML
1004---------------------
1005
1006The XML Special Interest Group has been working on XML-related Python code for a
1007while.  Its code distribution, called PyXML, is available from the SIG's Web
n1008-pages at `<http://www.python.org/sigs/xml-sig/>`_. The PyXML distribution also
n1007+pages at http://www.python.org/sigs/xml-sig/. The PyXML distribution also used
1009-used the package name ``xml``.  If you've written programs that used PyXML,
1008+the package name ``xml``.  If you've written programs that used PyXML, you're
1010-you're probably wondering about its compatibility with the 2.0 :mod:`xml`
1009+probably wondering about its compatibility with the 2.0 :mod:`xml` package.
1011-package.
1012
1013The answer is that Python 2.0's :mod:`xml` package isn't compatible with PyXML,
1014but can be made compatible by installing a recent version PyXML.  Many
1015applications can get by with the XML support that is included with Python 2.0,
1016but more complicated applications will require that the full PyXML package will
1017be installed.  When installed, PyXML versions 0.6.0 or greater will replace the
1018:mod:`xml` package shipped with Python, and will be a strict superset of the
1019standard package, adding a bunch of additional features.  Some of the additional
1020features in PyXML include:
1021
1022* 4DOM, a full DOM implementation from FourThought, Inc.
1023
1024* The xmlproc validating parser, written by Lars Marius Garshol.
1025
1026* The :mod:`sgmlop` parser accelerator module, written by Fredrik Lundh.
1027
n1028-.. % ======================================================================
n1026+.. ======================================================================
1029
1030
1031Module changes
1032==============
1033
1034Lots of improvements and bugfixes were made to Python's extensive standard
1035library; some of the affected modules include :mod:`readline`,
1036:mod:`ConfigParser`, :mod:`cgi`, :mod:`calendar`, :mod:`posix`, :mod:`readline`,
1065maintained OSes that fall into this category.
1066
1067As mentioned in the earlier discussion of 2.0's Unicode support, the underlying
1068implementation of the regular expressions provided by the :mod:`re` module has
1069been changed.  SRE, a new regular expression engine written by Fredrik Lundh and
1070partially funded by Hewlett Packard, supports matching against both 8-bit
1071strings and Unicode strings.
1072
n1073-.. % ======================================================================
n1071+.. ======================================================================
1074
1075
1076New modules
1077===========
1078
1079A number of new modules were added.  We'll simply list them with brief
1080descriptions; consult the 2.0 documentation for the details of a particular
1081module.
1141  are archives produced by :program:`PKZIP` on DOS/Windows or :program:`zip` on
1142  Unix, not to be confused with :program:`gzip`\ -format files (which are
1143  supported by the :mod:`gzip` module) (Contributed by James C. Ahlstrom.)
1144
1145* :mod:`imputil`: A module that provides a simpler way for writing customised
1146  import hooks, in comparison to the existing :mod:`ihooks` module.  (Implemented
1147  by Greg Stein, with much discussion on python-dev along the way.)
1148
n1149-.. % ======================================================================
n1147+.. ======================================================================
1150
1151
1152IDLE Improvements
1153=================
1154
1155IDLE is the official Python cross-platform IDE, written using Tkinter. Python
11562.0 includes IDLE 0.6, which adds a number of new features and improvements.  A
1157partial list:
1175
1176* IDLE can now be installed as a package.
1177
1178* In the editor window, there is now a line/column bar at the bottom.
1179
1180* Three new keystroke commands: Check module (Alt-F5), Import module (F5) and
1181  Run script (Ctrl-F5).
1182
t1183-.. % ======================================================================
t1181+.. ======================================================================
1184
1185
1186Deleted and Deprecated Modules
1187==============================
1188
1189A few modules have been dropped because they're obsolete, or because there are
1190now better ways to do the same thing.  The :mod:`stdwin` module is gone; it was
1191for a platform-independent windowing toolkit that's no longer developed.
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op