class(object) and (type)??

Chris Rebert clp at rebertia.com
Tue Sep 9 00:28:38 CEST 2008


Subclassing 'object' makes the class new-style as opposed to
old-style. object is the ultimate superclass of all new-style classes.
Old-style classes are deprecated and will be removed in Python 3.0,
but they're currently the default for backward-compatibility reasons.
See http://docs.python.org/ref/node33.html for more info.

- Chris

On Mon, Sep 8, 2008 at 2:35 PM, AON LAZIO <aonlazio at gmail.com> wrote:
> Hi again pythoners,
>      I notice in the class of a code having (object) and (type) attached to
> the name of the class.
> I know that in other cases, that means the class inherits methods and
> properties from other but
> In this case, what does it mean?
> For example,
>
> class PY(object):
>     def __init__(self):
>         ...
>
> class PO(type):
>      def __init__(self):
>          ...
>      What do "object" and "type" mean?
>
> Thanks in advance
>
> Aonlazio
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
Follow the path of the Iguana...
http://rebertia.com



More information about the Python-list mailing list