type() new style class instance says "class", not "ObjectType"
Magnus Lie Hetland
mlh at vier.idi.ntnu.no
Fri Apr 12 08:01:44 EDT 2002
After a few draft replies: Yes, type checking is needed for some
applications, such as pickling. However, I don't think there is a
general (intensive) description of the set of "instances" in the new
paradigm; you would probably be better of by a specific (extensive)
description. I.e. special-case what you need (e.g. strings and
numbers) and then check whether something is one of those types or
not.
Maybe... :)
On the other hand -- you don't _have_ to special-case anything. I
believe it's possible to construct any Python value through
function/method calls. But then your XML probably wouldn't be very
pretty ;)
--
Magnus Lie Hetland The Anygui Project
http://hetland.org http://anygui.org
More information about the Python-list
mailing list