Changes to Python's build process and to the C API include:
- Three new convenience macros were added for common return
values from extension functions: Py_RETURN_NONE,
Py_RETURN_TRUE, and Py_RETURN_FALSE.
- Another new macro, Py_CLEAR(obj),
decreases the reference count of obj and sets obj to the
null pointer.
- A new function, PyTuple_Pack(N, obj1,
obj2, ..., objN), constructs tuples from a variable
length argument list of Python objects.
- A new function, PyDict_Contains(d, k),
implements fast dictionary lookups without masking exceptions raised
during the look-up process.
- A new function, PyArg_VaParseTupleAndKeywords(),
is the same as PyArg_ParseTupleAndKeywords() but takes a
va_list instead of a number of arguments.
(Contributed by Greg Chapman.)
- A new method flag, METH_COEXISTS, allows a function
defined in slots to co-exist with a PyCFunction having the
same name. This can halve the access time for a method such as
set.__contains__().
- Python can now be built with additional profiling for the
interpreter itself. This is intended for people developing on the
Python core. Providing ---enable-profiling to the
configure script will let you profile the interpreter with
gprof, and providing the ---with-tsc
switch enables profiling using the Pentium's Time-Stamp-Counter
register. The switch is slightly misnamed, because the profiling
feature also works on the PowerPC platform, though that processor
architecture doesn't called that register the TSC.
- The tracebackobject type has been renamed to PyTracebackObject.
- The Windows port now builds under MSVC++ 7.1 as well as version 6.
See About this document... for information on suggesting changes.