ASPN ActiveState Programmer Network
  ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups | Web Services
SEARCH
advanced | search help

Reference
ActivePython 2.4
What's New
What's new in Python 2.3?
Contents
1 PEP 218: A Standard Set Datatype
2 PEP 255: Simple Generators
3 PEP 263: Source Code Encodings
4 PEP 273: Importing Modules from Zip Archives
5 PEP 277: Unicode file name support for Windows NT
6 PEP 278: Universal Newline Support
7 PEP 279: enumerate()
8 PEP 282: The logging Package
9 PEP 285: A Boolean Type
10 PEP 293: Codec Error Handling Callbacks
11 PEP 301: Package Index and Metadata for Distutils
12 PEP 302: New Import Hooks
13 PEP 305: Comma-separated Files
14 PEP 307: Pickle Enhancements
15 Extended Slices
16 Other Language Changes
17 New, Improved, and Deprecated Modules
18 Pymalloc: A Specialized Object Allocator
19 Build and C API Changes
20 Other Changes and Fixes
21 Porting to Python 2.3
22 Acknowledgements
About this document ...

MyASPN >> Reference >> ActivePython 2.4 >> What's New >> What's new in Python 2.3?
ActivePython 2.4 documentation

 
20 Other Changes and Fixes

As usual, there were a bunch of other improvements and bugfixes scattered throughout the source tree. A search through the CVS change logs finds there were 523 patches applied and 514 bugs fixed between Python 2.2 and 2.3. Both figures are likely to be underestimates.

Some of the more notable changes are:

  • If the PYTHONINSPECT environment variable is set, the Python interpreter will enter the interactive prompt after running a Python program, as if Python had been invoked with the -i option. The environment variable can be set before running the Python interpreter, or it can be set by the Python program as part of its execution.

  • The regrtest.py script now provides a way to allow ``all resources except foo.'' A resource name passed to the -u option can now be prefixed with a hyphen ("-") to mean ``remove this resource.'' For example, the option `-uall,-bsddb' could be used to enable the use of all resources except bsddb.

  • The tools used to build the documentation now work under Cygwin as well as Unix.

  • The SET_LINENO opcode has been removed. Back in the mists of time, this opcode was needed to produce line numbers in tracebacks and support trace functions (for, e.g., pdb). Since Python 1.5, the line numbers in tracebacks have been computed using a different mechanism that works with ``python -O''. For Python 2.3 Michael Hudson implemented a similar scheme to determine when to call the trace function, removing the need for SET_LINENO entirely.

    It would be difficult to detect any resulting difference from Python code, apart from a slight speed up when Python is run without -O.

    C extensions that access the f_lineno field of frame objects should instead call PyCode_Addr2Line(f->f_code, f->f_lasti). This will have the added effect of making the code work as desired under ``python -O'' in earlier versions of Python.

    A nifty new feature is that trace functions can now assign to the f_lineno attribute of frame objects, changing the line that will be executed next. A "jump" command has been added to the pdb debugger taking advantage of this new feature. (Implemented by Richie Hindle.)

See About this document... for information on suggesting changes.

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState 2004 All rights reserved