| 1 | n/a | """Create new objects of various types. Deprecated. |
|---|
| 2 | n/a | |
|---|
| 3 | n/a | This module is no longer required except for backward compatibility. |
|---|
| 4 | n/a | Objects of most types can now be created by calling the type object. |
|---|
| 5 | 1 | """ |
|---|
| 6 | 1 | from warnings import warnpy3k |
|---|
| 7 | 1 | warnpy3k("The 'new' module has been removed in Python 3.0; use the 'types' " |
|---|
| 8 | 1 | "module instead.", stacklevel=2) |
|---|
| 9 | 1 | del warnpy3k |
|---|
| 10 | n/a | |
|---|
| 11 | 1 | from types import ClassType as classobj |
|---|
| 12 | 1 | from types import FunctionType as function |
|---|
| 13 | 1 | from types import InstanceType as instance |
|---|
| 14 | 1 | from types import MethodType as instancemethod |
|---|
| 15 | 1 | from types import ModuleType as module |
|---|
| 16 | n/a | |
|---|
| 17 | 1 | from types import CodeType as code |
|---|