Staging
v0.5.1
https://github.com/python/cpython
Revision 512f2eee1b677c023116f8f96e12f65f385b596f authored by Armin Rigo on 09 November 2004, 15:35:23 UTC, committed by Armin Rigo on 09 November 2004, 15:35:23 UTC
* using malloc() and free() directly, as explained in the new comment
* coding style in the PyGILState_*() functions
* the recent destroy-tstate-without-holding-the-GIL bug
* lock fixes and many more comments in thread.c
1 parent 3497155
Raw File
Tip revision: 512f2eee1b677c023116f8f96e12f65f385b596f authored by Armin Rigo on 09 November 2004, 15:35:23 UTC
Backported thread fixes from 2.4 (by mostly copying pystate.c over from 2.4):
Tip revision: 512f2ee
new.py
"""Create new objects of various types.  Deprecated.

This module is no longer required except for backward compatibility.
Objects of most types can now be created by calling the type object.
"""

from types import ClassType as classobj
from types import FunctionType as function
from types import InstanceType as instance
from types import MethodType as instancemethod
from types import ModuleType as module

# CodeType is not accessible in restricted execution mode
try:
    from types import CodeType as code
except ImportError:
    pass
back to top