/ Published in: Python
URL: http://effbot.org/librarybook/types.htm
Expand |
Embed | Plain Text
import types def check(object): print object, if type(object) is types.IntType: print "INTEGER", if type(object) is types.FloatType: print "FLOAT", if type(object) is types.StringType: print "STRING", if type(object) is types.ClassType: print "CLASS", if type(object) is types.InstanceType: print "INSTANCE",
You need to login to post a comment.
