blob: bee11ed38e6c92eb4bc7d47ec845f788757361b7 [file] [log] [blame]
Guido van Rossum94c9d902002-06-16 01:22:13 +00001"""Create new objects of various types. Deprecated.
2
3This module is no longer required except for backward compatibility.
4Objects of most types can now be created by calling the type object.
5"""
6
7from types import ClassType as classobj
8from types import FunctionType as function
Guido van Rossum94c9d902002-06-16 01:22:13 +00009from types import MethodType as instancemethod
10from types import ModuleType as module
11
12# CodeType is not accessible in restricted execution mode
13try:
14 from types import CodeType as code
15except ImportError:
16 pass