From 458120dd40db6b4df55a4e96b650e16798ef06a0 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Tue, 3 May 2011 11:25:13 +0000 Subject: add hg and python --- sys/lib/python/new.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 sys/lib/python/new.py (limited to 'sys/lib/python/new.py') diff --git a/sys/lib/python/new.py b/sys/lib/python/new.py new file mode 100644 index 000000000..99a1c3fdc --- /dev/null +++ b/sys/lib/python/new.py @@ -0,0 +1,17 @@ +"""Create new objects of various types. Deprecated. + +This module is no longer required except for backward compatibility. +Objects of most types can now be created by calling the type object. +""" + +from types import ClassType as classobj +from types import FunctionType as function +from types import InstanceType as instance +from types import MethodType as instancemethod +from types import ModuleType as module + +# CodeType is not accessible in restricted execution mode +try: + from types import CodeType as code +except ImportError: + pass -- cgit v1.2.3