Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 94c9d90

Browse files
committed
Forgot to add this. It's part of patch 568629.
1 parent 0f1afb1 commit 94c9d90

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

Lib/new.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""Create new objects of various types. Deprecated.
2+
3+
This module is no longer required except for backward compatibility.
4+
Objects of most types can now be created by calling the type object.
5+
"""
6+
7+
from types import ClassType as classobj
8+
from types import FunctionType as function
9+
from types import InstanceType as instance
10+
from types import MethodType as instancemethod
11+
from types import ModuleType as module
12+
13+
# CodeType is not accessible in restricted execution mode
14+
try:
15+
from types import CodeType as code
16+
except ImportError:
17+
pass

0 commit comments

Comments
 (0)