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.
...definition of NULL in C source code; all definitions were removed and add #error to Python.h if NULL isn't defined after #include of stdio.h. Py_PROTO() macros that were removed in 2.0b1 have been restored for backwards compatibility (at the source level) with old extensions. A wrapper API was added for signal() and sigaction(). Instead of either function, always use PyOS_getsig() to get a signal handler and PyOS_setsig() to set one. A new convenience typedef PyOS_sigha...
...macro. It works as-is when the platform C computes true for x != x if and only if X is a NaN. Other platforms can override the default definition with a platform- specific spelling in that platform's pyconfig.h. You can also override pyport.h's default Py_IS_INFINITY definition now. C API SF patch 1044089: New function PyEval_ThreadsInitialized() returns non-zero if PyEval_InitThreads() has been called. The undocumented and unused extern int _PyThread_Started was removed. The C API calls ...
...macros or some other kind of preprocessor or whatever, and imported from a module, rather than requiring major hacking in the parser, the bytecode compiler, and the virtual machine. PEP 275 - Switching on Multiple Values - Lemburg I'm still not convinced that we need a switch statement, and the proposed syntax has problems: e.g. why only constants? why not allow ranges? In addition, it proposes many different alternatives without picking one. The first alternative proposed by th...
...definition in the nearest enclosing function scope will be used. One consequence of this change is that lambda statements could reference variables in the namespaces where the lambda is defined. In some unusual cases, this change will break code. In all previous version of Python, names were resolved in exactly three namespaces -- the local namespace, the global namespace, and the builtin namespace. According to this old definition, if a function A is defined within a function B, the names bo...
...macros, while Python extension module init functions will be declared with PyMODINIT_FUNC. DL_EXPORT/DL_IMPORT macros are deprecated. A bug was fixed that could cause COUNT_ALLOCS builds to segfault, or get into infinite loops, when a new-style class got garbage-collected. Unfortunately, to avoid this, the way COUNT_ALLOCS works requires that new-style classes be immortal in COUNT_ALLOCS builds. Note that COUNT_ALLOCS is not enabled by default, in either release or debug builds, and that new-...
If you didn't find what you need, try your search in the Python language documentation.