2.2 features
Gustavo Niemeyer
niemeyer at conectiva.com
Tue Jul 31 19:24:41 EDT 2001
> Ah, but there you're wrong. Classes are also instances (of the
> metaclass), and when we don't know anything about an object X, after
> knowing that "X in Foo" is true, we would still not know whether X was
> a Foo subclass or a Foo instance. Very different beasts.
I'm starting to like the is{subclass,instance}() version. It's probably
quicker for one to understand code written by others, and for
non-fulltime-python-programmers to remember what "in" means in each
context.
--
Gustavo Niemeyer
[ 2AAC 7928 0FBF 0299 5EB5 60E2 2253 B29A 6664 3A0C ]
More information about the Python-list
mailing list