pyconfig.py updated for Python 2.5-alpha1

The first alpha release of Python 2.5 appeared on python.org Wednesday. Using Andrew Kuchling's "What's New In Python 2.5" document as a starting point, I updated pyconfig to test for the new features. (pyconfig is discussed in detail in The Python Tourist #5).

New Python 2.5 features that are detected:

  • PEP 308 - Conditional expressions
  • PEP 328 - Relative imports
  • PEP 341 - Unified try/except/finally
  • PEP 342 - Sending values to generators
  • PEP 342 - .throw() in generators
  • PEP 342 - .close() in generators
  • PEP 343 - The 'with' statement
  • PEP 352 - The BaseException class
  • PEP 357 - The __index__ method

A few new features in Python 2.5-alpha1 are not checked (either because it doesn't make sense to check for them, or you can do it with an existing test):

  • PEP 309 - functional module (use Have_Module("functional") instead)
  • PEP 314 - Distutils module change
  • PEP 338 - Affects command-line usage
  • PEP 353 - C API, not visible from Python

If you'd like a copy of pyconfig, you can get it here: pyconfig.py

Reply

The content of this field is kept private and will not be shown publicly.