summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-02-13 00:04:31 (GMT)
committerGuido van Rossum <guido@python.org>1996-02-13 00:04:31 (GMT)
commit0f6f812acb41633592c3024ba4671241a67a2db5 (patch)
tree53c2b5ed4b4a15b0a0bf974f32856254a6902218 /Lib
parenta98b0a1ff5462a148ec8c90e2ef2d060097423b4 (diff)
downloadcpython-0f6f812acb41633592c3024ba4671241a67a2db5.zip
cpython-0f6f812acb41633592c3024ba4671241a67a2db5.tar.gz
cpython-0f6f812acb41633592c3024ba4671241a67a2db5.tar.bz2
better way to define ComplexType
Diffstat (limited to 'Lib')
-rw-r--r--Lib/types.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/types.py b/Lib/types.py
index 0d25081..b684173 100644
--- a/Lib/types.py
+++ b/Lib/types.py
@@ -9,10 +9,10 @@ TypeType = type(NoneType)
IntType = type(0)
LongType = type(0L)
FloatType = type(0.0)
-import __builtin__
-if vars(__builtin__).has_key('complex'):
+try:
ComplexType = type(complex(0,1))
-del __builtin__
+except NameError:
+ pass
StringType = type('')