annotate Lib/new.py @ 54294:dba767bc3155 legacy-trunk

remove mention of old ctypes version
author Benjamin Peterson <benjamin@python.org>
date Sat, 23 May 2009 20:59:09 +0000
parents 816c21c762c8
children b6bf2a5f49dd
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
4588b6820a11 Forgot to add this. It's part of patch 568629.
Guido van Rossum <guido@python.org>
parents:
diff changeset
17 # CodeType is not accessible in restricted execution mode
4588b6820a11 Forgot to add this. It's part of patch 568629.
Guido van Rossum <guido@python.org>
parents:
diff changeset
18 try:
4588b6820a11 Forgot to add this. It's part of patch 568629.
Guido van Rossum <guido@python.org>
parents:
diff changeset
19 from types import CodeType as code
4588b6820a11 Forgot to add this. It's part of patch 568629.
Guido van Rossum <guido@python.org>
parents:
diff changeset
20 except ImportError:
4588b6820a11 Forgot to add this. It's part of patch 568629.
Guido van Rossum <guido@python.org>
parents:
diff changeset
21 pass