Is 'everything' a refrence or isn't it?

Mike Meyer mwm at mired.org
Sat Jan 14 23:21:14 EST 2006


Steven D'Aprano <steve at REMOVETHIScyber.com.au> writes:
> Likewise instances of object() have a rich, object-oriented structure --
> dir(object()) returns a list with twelve items -- but every instance is
> identical.

That's because all the things in dir(object()) are also in dir(object):

>>> dir(object) == dir(object())
True

So those properties of object() are all identical because they're
really properties of object. If you define an object() by those
properties, you have to conclude that object is itself an instance of
object().

        <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.



More information about the Python-list mailing list