]> granicus.if.org Git - python/commitdiff
add ComplexType
authorGuido van Rossum <guido@python.org>
Thu, 25 Jan 1996 17:31:58 +0000 (17:31 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 25 Jan 1996 17:31:58 +0000 (17:31 +0000)
Lib/types.py

index fca95b33778deedafee3b77c94b7c7628b2726e5..0d2508113950fdc1d54e3bfb94e39aa3c04ed5d4 100644 (file)
@@ -9,6 +9,10 @@ TypeType = type(NoneType)
 IntType = type(0)
 LongType = type(0L)
 FloatType = type(0.0)
+import __builtin__
+if vars(__builtin__).has_key('complex'):
+       ComplexType = type(complex(0,1))
+del __builtin__
 
 StringType = type('')