What is object()

David Eppstein eppstein at ics.uci.edu
Thu Jan 22 15:09:16 EST 2004


In article <bup01m$hjm$1 at panix1.panix.com>, aahz at pythoncraft.com (Aahz) 
wrote:

> >  i was reading library refrence manual. there i found
> >object() function. they says in library refrence that 
> >        "Return a new featureless object. object() is
> >a base for all new style classes. It has the methods
> >that are common to all instances of new style
> >classes." 
> 
> There's not much use for an instance of object.  Don't worry about it.

It can be useful when you want something that is guaranteed to be 
different from all other objects and has no other purpose than existing 
and being different.

Beyond that somewhat specialized use, object exists to be subclassed, 
not instantiated directly.

-- 
David Eppstein                      http://www.ics.uci.edu/~eppstein/
Univ. of California, Irvine, School of Information & Computer Science



More information about the Python-list mailing list