Notice: While JavaScript is not essential for this website, your interaction with the content will be limited. Please turn JavaScript on for the full experience.
What's new in Python 2.3 What's new in Python 2.3Here are the (subjective) highlights of what's new in Python 2.3.
FasterAccording to a couple of simple benchmark, Python 2.3 is about 20-30% faster than Python 2.2.3. Some of this speed-up was obtained by removing the SET_LINENO opcodes, which means that the difference is less impressive when comparing "python -O"; the rest was various careful tune-ups.
New or upgraded built-insMany new doctest extensions from Jim Fulton, which among other enhancements, allows doctests to be run by unittests.
csv - support for reading and writing files in so-called comma-separated-value format. (New in 2.3b1.)
timeit - module to time the speed of code snippets. (New in 2.3b1.)
platform - find out everything you always wanted to know about your platform, but were afraid to ask. (New in 2.3b1; by Marc-Andre Lemburg.)
shelve - optionally supports automatic writeback, and exposes pickle protocol versions. (New in 2.3b1.)
DocXMLRPCServer - a self-documenting XML server library. (New in 2.3b1.)
rotor - this module is deprecated. It is too easily cracked. (New in 2.3b1.)
re - the .*? pattern is now special-cased to avoid the recursion limit. (New in 2.3b1.)
Bastion and rexec - these modules are disabled, because they aren't safe in Python 2.3 (nor in Python 2.2). (New in 2.3a2.)
bsddb - the old bsddb module has finally been retired. The formerly 3rd party PyBSDDB wrapper is now available in Python 2.3, as the bsddb package. This is compatible with Sleepycat Berkeley DB versions 3.0 to 4.1. New in 2.3a2: the Windows installer now ships with Sleepycat's 4.1.25.NC, the latest release without strong cryptography.
The old bsddb module code is still available as the bsddb185 module, but this is not built by default. Should you still be using a system which only has Berkeley DB 1.85 installed (often indicated by the presence of /usr/include/db.h but not /usr/lib/libdb.a file), the following changes should keep you running.
Add this line:
bsddb185 bsddbmodule.c
to Modules/Setup. In most cases you should not require any -I, -L or -l flags. It seems on those systems which still ship 1.85, /usr/include/db.h is the include file and the symbols are present in libc.
To force that version of the module to be used as the default when importing the name "bsddb", add the following line to your sitecustomize.py file:
import bsddb185 as bsddb
bz2 - interface to the bz2 compression library, by Gustavo Niemeyer.
datetime - a fast, compact implementation in C of date and time calculations ranging from the year 1 to 9999, with optional timezone support; written by Tim Peters. (New in 2.3a2: too much to list here; see Misc/NEWS.)
heapq - implements the heap queue algoritm known from 1st year algorithms classes. Code by Kevin O'Connor, write-up by François Pinard, many improvements by Tim Peters.
imaplib - added SSL support.
imp - exposed the "import lock". (New in 2.3a2.)
itertools - high speed, memory efficient looping constructs inspired by Haskell and SML. (New in 2.3a2.) (Some improvements in 2.3b1, including subsumption of times() into repeat(), and addition of chain() and cycle().)
logging - a flexible, configurable logging package based on log4j and our own PEP 282; written by Vinay Sajip. (New in 2.3a2: warn/WARN renamed to warning/WARNING; logging module actually included in the Windows installer.)
optparse - a powerful command line option parser, by Greg Ward (based on his Optik package).
ossaudiodev - an interface to OSS (Open Sound System), the standard audio API for Linux and some BSD flavors. Code by Greg Ward, based on the (now deprecated) linuxaudiodev module by Peter Bosch. (New in 2.3a2: because of driver issues, the tests for these modules is not run by default unless "regrtest.py -u audio" is used.)
pickle, cPickle and copy - a new pickling protocol was added for more efficient pickling of (especially) new-style class instances and to allow more pickling flexibility. (PEP 307) (New in 2.3a2.)
random - this now uses a new core generator, the Mersenne Twister algorithm. This is the current best practice random number generator algorithm, widely tested, with a period of 2**19937-1. Code by Raymond Hettinger.
sets - a new module implementing two flexible set data types. Code by a cast of thousands, including Greg V. Wilson, Alex Martelli, Tim Peters, and Raymond Hettinger. (PEP 218)
socket - sockets now support an optional timeout on all operations. Code by Michael Gilfix and Bernard Yue, based on Tim O'Malley's timeoutsocket.py. Some bugs in this feature were fixed in 2.3b1; as a result, all platforms now use a Python wrapper class for socket objects. Also new in 2.3b1, support for inet_pton() and inet_ntop().
ssl - the Windows installer now incorporates SSL support. (New in 2.3a2: timeouts set on the underlying socket are now handled correctly.)
Tkinter - now returns Tcl objects instead of strings. Support for Tcl/Tk 8.0 and 8.1 is dropped; support for threaded Tcl/Tk is added, as is support for various Tk 8.4 features. The Windows installer now ships with Tcl/Tk 8.4.3. In 2.3b1, variable wrappers now also pass objects directly to Tcl, instead of converting them to strings.
trace - a tool for tracing program execution and reporting code coverage
textwrap - simple but effective text paragraph wrapping, by Greg Ward.
zipimport - import modules from zipfiles, implemented in C by Just van Rossum based upon earlier code by James Ahlstrom. (New in 2.3a2: several serious bugs discovered in 2.3a1 fixed.)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4