blob: 6ce9a5563a4b4c62d18f1910be9e325b0f6473c8 [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"""
Christian Heimes45f9af32007-11-27 21:50:00 +00006from warnings import warn as _warn
7_warn("The 'new' module is not supported in 3.x, use the 'types' module "
8 "instead.", DeprecationWarning, 2)
Guido van Rossum94c9d902002-06-16 01:22:13 +00009
Guido van Rossum13257902007-06-07 23:15:56 +000010classobj = type
Guido van Rossum94c9d902002-06-16 01:22:13 +000011from types import FunctionType as function
Guido van Rossum94c9d902002-06-16 01:22:13 +000012from types import MethodType as instancemethod
13from types import ModuleType as module
Guido van Rossuma8add0e2007-05-14 22:03:55 +000014from types import CodeType as code