mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00

svn+ssh://pythondev@svn.python.org/python/trunk ........ r59195 | facundo.batista | 2007-11-27 19:50:12 +0100 (Tue, 27 Nov 2007) | 4 lines Moved the errno import from inside the functions to the module level. Fixes issue 1755179. ........ r59199 | christian.heimes | 2007-11-27 22:28:40 +0100 (Tue, 27 Nov 2007) | 1 line Backport of changes to PCbuild9 from the py3k branch ........ r59200 | christian.heimes | 2007-11-27 22:34:01 +0100 (Tue, 27 Nov 2007) | 1 line Replaced import of the 'new' module with 'types' module and added a deprecation warning to the 'new' module. ........ r59201 | christian.heimes | 2007-11-27 22:35:44 +0100 (Tue, 27 Nov 2007) | 1 line Added a deprecation warning to the 'new' module. ........
14 lines
525 B
Python
14 lines
525 B
Python
"""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 warnings import warn as _warn
|
|
_warn("The 'new' module is not supported in 3.x, use the 'types' module "
|
|
"instead.", DeprecationWarning, 2)
|
|
|
|
classobj = type
|
|
from types import FunctionType as function
|
|
from types import MethodType as instancemethod
|
|
from types import ModuleType as module
|
|
from types import CodeType as code
|