************************ What's New in Python 2.7 ************************ :Author: A.M. Kuchling (amk at amk.ca) .. hyperlink all the methods & functions. .. T_STRING_INPLACE not described in main docs .. $Id$ Rules for maintenance: * Anyone can add text to this document. Do not spend very much time on the wording of your changes, because your text will probably get rewritten to some degree. * The maintainer will go through Misc/NEWS periodically and add changes; it's therefore more important to add your changes to Misc/NEWS than to this file. * This is not a complete list of every single change; completeness is the purpose of Misc/NEWS. Some changes I consider too small or esoteric to include. If such a change is added to the text, I'll just remove it. (This is another reason you shouldn't spend too much time on writing your addition.) * If you want to draw your new text to the attention of the maintainer, add 'XXX' to the beginning of the paragraph or section. * It's OK to just add a fragmentary note about a change. For example: "XXX Describe the transmogrify() function added to the socket module." The maintainer will research the change and write the necessary text. * You can comment out your additions if you like, but it's not necessary (especially when a final release is some months away). * Credit the author of a patch or bugfix. Just the name is sufficient; the e-mail address isn't necessary. * It's helpful to add the bug/patch number in a parenthetical comment. XXX Describe the transmogrify() function added to the socket module. (Contributed by P.Y. Developer; :issue:`12345`.) This saves the maintainer some effort going through the SVN logs when researching a change. This article explains the new features in Python 2.7. Python 2.7 was released on July 3, 2010. Numeric handling has been improved in many ways, for both floating-point numbers and for the :class:`~decimal.Decimal` class. There are some useful additions to the standard library, such as a greatly enhanced :mod:`unittest` module, the :mod:`argparse` module for parsing command-line options, convenient :class:`~collections.OrderedDict` and :class:`~collections.Counter` classes in the :mod:`collections` module, and many other improvements. Python 2.7 is planned to be the last of the 2.x releases, so we worked on making it a good release for the long term. To help with porting to Python 3, several new features from the Python 3.x series have been included in 2.7. This article doesn't attempt to provide a complete specification of the new features, but instead provides a convenient overview. For full details, you should refer to the documentation for Python 2.7 at https://docs.python.org. If you want to understand the rationale for the design and implementation, refer to the PEP for a particular new feature or the issue on https://bugs.python.org in which a change was discussed. Whenever possible, "What's New in Python" links to the bug/patch item for each change. .. toctree:: :maxdepth: 2 :numbered: :caption: Contents :name: whats_new part1 part2 part3 part4 part5 part6 part7 part8 part9 part10 part11 part12 part13 part14 part15 part16