What is object()

James Henderson james at logicalprogression.net
Thu Jan 22 12:12:13 EST 2004


On Thursday 22 January 2004 3:44 pm, Hameed Khan wrote:
> hi,
>   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."
>
> My questions are whats the use of this function and
> the object returned by it? and what are new style
> classes?.
>
> Thanks,
> Hameed Khan

Roughly, the purpose of object is that inheriting from it makes a new-style 
class.  For a description of new-style classes see:

http://www.python.org/2.2.3/descrintro.html

and maybe also:

http://users.rcn.com/python/download/Descriptor.htm

Also see the ongoing argument about the definition of a new-style class on 
python-dev under the thread "Hot-To Guide for Descriptors - Nits! :-)"

James
-- 
James Henderson, Logical Progression Ltd.
http://www.logicalprogression.net/
http://sourceforge.net/projects/mailmanager/





More information about the Python-list mailing list