PageRenderTime 383ms CodeModel.GetById 111ms app.highlight 2ms RepoModel.GetById 179ms app.codeStats 0ms

Python | 21 lines | 13 code | 2 blank | 6 comment | 0 complexity | 870f1d28a104ae69ed403e393f7c2ced MD5 | raw file
 1"""Create new objects of various types.  Deprecated.
 3This module is no longer required except for backward compatibility.
 4Objects of most types can now be created by calling the type object.
 6from warnings import warnpy3k
 7warnpy3k("The 'new' module has been removed in Python 3.0; use the 'types' "
 8            "module instead.", stacklevel=2)
 9del warnpy3k
11from types import ClassType as classobj
12from types import FunctionType as function
13from types import InstanceType as instance
14from types import MethodType as instancemethod
15from types import ModuleType as module
17# CodeType is not accessible in restricted execution mode
19    from types import CodeType as code
20except ImportError:
21    pass