Last-Modified-Date: 2004-11-07 What's New In Python This is an outline of the topics covered in the talk, with more information and references to sources of further information. Where mention is made of a PEP (Python Enhancement Proposal), see the listed PEP, available at http://www.python.org/peps/. The absolute latest version of the python documentation can be found at http://www.python.org/dev/doc/devel/, and the quickest way to find information about a new module is to start at the module index, http://www.python.org/dev/doc/devel/modindex.html - What's a Python Release? Typically, Python has one release every 12-18 months. This is deliberately slow. A bugfix release is issued every 6 months or so (or sooner, if a critical bugfix has reared it's ugly head) - What's a Bugfix Release? See PEP 6 - Release Management and the BDFL - Ghosts of Pythons Past, Present and Future - Past - 2.2 is the past. I will be cutting no more 2.2 releases. No-one should be using 2.2 - 2.3 is a painless upgrade from 2.2. (2.1 to 2.2 was more tricky) - 2.3.5 is scheduled for shortly after 2.4 final. This is the last planned release in the 2.3 series - (Now not so) New in 2.3 For more details on the new features of 2.3, see either Andrew Kuchling's "What's New" document, the highlights, or the detailed release notes, all available from http://www.python.org/2.3/ - boolean type (True/False) See PEP 285. A kinda-sorta-not-really boolean type was added in a 2.2 bugfix release (before my time as release manager) - set type See PEP 218, or the module documentation for 'sets' - csv module See PEP 305, or the module documentation - pymalloc Python's own custom memory allocator. This provides much better performance, without sacrificing platform portability (too much). - datetime A standard interface for handling dates and times. Handles the horror that is timezone manipulation by ignoring them (but you can subclass the types to add your own). - zipimport/new import hooks You can put a zip file containing python modules and packages into sys.path, and Python will import them directly from the zip. This is very much like Java's .jar format. The new import hooks were used to implement this and provide all sorts of tasty ways to mess with the behaviour of imports. See PEPs 273 and 302. - enumerate builtin Turns a sequence into a sequence of (index, item) two-tuples. - more Unicode support Unicode is like the GPL - once you start working with it, it ends up all through your code. If you're going to need Unicode, build support in at the start. - optparse, platform, timeit, itertools, logging See the reference documents (from the module index) for more on these new modules - Present - 2.4 final (should be out by the time of the conference) PEP 320 is the release schedule for 2.4. Andrew Kuchling's "What's New In Python 2.4" (available from http://www.python.org/2.4/) is a good overview of many of the new features of 2.4. - New in 2.4 - generator expressions A lazy list comprehension. See PEP 289. - decimal Fixed-point number support. For most people, floats and ints are sufficient. But for a moderately large number of applications, you need more accuracy (and control over the accuracy). See PEP 327. - int/long unification Integer arithmetic that would previously cause an OverflowError is now automatically promoted to a long. Another step in the long path that is outlined in PEP 237. - multi-line imports This removes an annoying wart in Python. Covered in PEP 328, along with a bunch of other ideas that were pushed out to Python 2.5 - optimisations (sets, deque, ...) A number of the new-in-2.3 types were re-implemented in C. This is a common approach for Python - the first version is in Python (for ease of implementation/experimentation), and then it's recoded in C (for speed). - cookielib A standard way to handle cookies. Integrated into the rest of the relevant stdlib modules. - doctest A saner way to write tests. - simpler string templates See PEP 292 - msi installer The windows installer now uses Microsoft's standard MSI format. This integrates better with Windows. - subprocess A simpler way to invoke a subprocess, replacing the many and varied older approaches. This is documented in PEP 324. - decorators, the ultimate bike shed PEP 318. - the scream of the release manager [ munch ] - One Man, One Vote - The vote belongs to Guido - Lessons learned - Future - 2.4 is now in bugfix-only mode - 2.5 in 12-18 months - the process of changes to python - deprecations Any backwards-incompatible change requires at least two releases, sometimes three. The path is that it'll first raise a PendingDeprecationWarning (which aren't shown by default), then a DeprecationWarning in the next release, before being ripped out the following release. We're very conservative about deprecating old features. - PEP process Most major changes or additions to Python go through the PEP process. These collect rationales, explanations, excuses and detailed information about the proposed change. Not all PEPs are accepted - many are rejected. A couple were written just to be rejected, so that future arguments could be pointed at the PEP. See PEP 1 for more on the PEP process, and PEP 666 for an example of the latter. - python-dev@python.org. The mailing list for the developers of python. It's an open list, and people are encouraged to join and read it. Please please read for a bit and get a feel for how the list works before jumping in. Additionally, if you have an idea for a Python enhancement, _first_ raise it on comp.lang.python and collect feedback. - Python 3.0 / Python3K / Python3000 See PEP 3000. Python 3.0 has no scheduled date - it's a collection of ideas. Python 3.0 is where we get to break backwards compatibility and fix a lot of what in hindsight have turned out to be mistakes.