annotate Lib/new.py @ 80661:94de77bd0b4b 2.7

Issue #16194: document imp.load_dynamic problems when read several extension modules from the same binary object file.
author Andrew Svetlov <andrew.svetlov@gmail.com>
date Thu, 29 Nov 2012 19:51:28 +0200
parents b6bf2a5f49dd
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23873
4588b6820a11 Forgot to add this. It's part of patch 568629.
Guido van Rossum <guido@python.org>
parents:
diff changeset
1 """Create new objects of various types. Deprecated.
4588b6820a11 Forgot to add this. It's part of patch 568629.
Guido van Rossum <guido@python.org>
parents:
diff changeset
2
4588b6820a11 Forgot to add this. It's part of patch 568629.
Guido van Rossum <guido@python.org>
parents:
diff changeset
3 This module is no longer required except for backward compatibility.
4588b6820a11 Forgot to add this. It's part of patch 568629.
Guido van Rossum <guido@python.org>
parents:
diff changeset
4 Objects of most types can now be created by calling the type object.
4588b6820a11 Forgot to add this. It's part of patch 568629.
Guido van Rossum <guido@python.org>
parents:
diff changeset
5 """
46775
816c21c762c8 Deprecate the new module for removal in 3.0.
Brett Cannon <bcannon@gmail.com>
parents: 44038
diff changeset
6 from warnings import warnpy3k
816c21c762c8 Deprecate the new module for removal in 3.0.
Brett Cannon <bcannon@gmail.com>
parents: 44038
diff changeset
7 warnpy3k("The 'new' module has been removed in Python 3.0; use the 'types' "
816c21c762c8 Deprecate the new module for removal in 3.0.
Brett Cannon <bcannon@gmail.com>
parents: 44038
diff changeset
8 "module instead.", stacklevel=2)
816c21c762c8 Deprecate the new module for removal in 3.0.
Brett Cannon <bcannon@gmail.com>
parents: 44038
diff changeset
9 del warnpy3k
23873
4588b6820a11 Forgot to add this. It's part of patch 568629.
Guido van Rossum <guido@python.org>
parents:
diff changeset
10
4588b6820a11 Forgot to add this. It's part of patch 568629.
Guido van Rossum <guido@python.org>
parents:
diff changeset
11 from types import ClassType as classobj
4588b6820a11 Forgot to add this. It's part of patch 568629.
Guido van Rossum <guido@python.org>
parents:
diff changeset
12 from types import FunctionType as function
4588b6820a11 Forgot to add this. It's part of patch 568629.
Guido van Rossum <guido@python.org>
parents:
diff changeset
13 from types import InstanceType as instance
4588b6820a11 Forgot to add this. It's part of patch 568629.
Guido van Rossum <guido@python.org>
parents:
diff changeset
14 from types import MethodType as instancemethod
4588b6820a11 Forgot to add this. It's part of patch 568629.
Guido van Rossum <guido@python.org>
parents:
diff changeset
15 from types import ModuleType as module
4588b6820a11 Forgot to add this. It's part of patch 568629.
Guido van Rossum <guido@python.org>
parents:
diff changeset
16
55744
b6bf2a5f49dd restricted environments are no more
Benjamin Peterson <benjamin@python.org>
parents: 46775
diff changeset
17 from types import CodeType as code