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

Mike Meyer mwm at mired.org
Sun Jan 15 09:02:53 CET 2006


Steven D'Aprano <steve at REMOVETHIScyber.com.au> writes:
> On Sat, 14 Jan 2006 23:21:14 -0500, Mike Meyer wrote:
>> 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().
> In this specific case, object instances get their properties from the
> class, but your conclusion doesn't follow. The easiest way to tell this is
> to ask, can we distinguish the object class (type) from an object
> instance? The answer is, yes we can:
>>>> object
> <type 'object'>
>>>> object()
> <object object at 0xf705d3b8>

Yes, but you're not looking at properties of the object, but rather of
the type of the object.

And for what it's worth, object is an instance of object.

>>> isinstance(object, object)
True


        <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