On Nov 28, 2007 2:23 PM, <[EMAIL PROTECTED]> wrote: > Sorry if this is a dumb question, but are there actually good reasons to > remove "types"? > IMHO the types module helps keeping code readable. > For example > "if type(obj) == FloatType" > is just more readable than > "if type(obj) == type(1.0)".
But you should really be writing:: if isinstance(obj, float) for most situations, and:: if type(obj) == float if you really *have* to check the exact type. STeVe -- I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a tiny blip on the distant coast of sanity. --- Bucky Katt, Get Fuzzy _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com