better way to define ComplexType

This commit is contained in:
Guido van Rossum 1996-02-13 00:04:31 +00:00
parent a98b0a1ff5
commit 0f6f812acb

View file

@ -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('')