summaryrefslogtreecommitdiff
path: root/Lib/types.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-02-13 00:04:31 +0000
committerGuido van Rossum <guido@python.org>1996-02-13 00:04:31 +0000
commita3a68a9e01e9e4313ce02250e4f4e302ab56e1de (patch)
treea97bdc0314a025c02e987245c712cd52f19d724c /Lib/types.py
parentf5187c8d4f64a34cd37fc6c071e0a80129af42cf (diff)
downloadcpython-a3a68a9e01e9e4313ce02250e4f4e302ab56e1de.tar.gz
better way to define ComplexType
Diffstat (limited to 'Lib/types.py')
-rw-r--r--Lib/types.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/types.py b/Lib/types.py
index 0d25081139..b6841735ce 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('')