[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    Re: 2.2 features
From:       Gustavo Niemeyer <niemeyer () conectiva ! com>
Date:       2001-07-31 23:24:41
[Download RAW message or body]

> 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 ]

-- 
http://mail.python.org/mailman/listinfo/python-list

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic