super, object and type?
ironfroggy at gmail.com
Tue Aug 12 19:35:07 CEST 2008
object and type both are instances of type. Yes, type is an instance of itself.
type inherits object.
On Tue, Aug 12, 2008 at 1:14 PM, ssecorp <circularfunc at gmail.com> wrote:
>>>> super(object, type)
> <super: <class 'object'>, <type object>>
>>>> super(type, object)
> <super: <class 'type'>, <type object>>
> how can both work?
> they can't both be the superclass of each other right? or is it some
> sort of mutually recursive definition?
> Help on class object in module __builtin__:
> class object
> | The most base type
> Help on class type in module __builtin__:
> class type(object)
> | type(object) -> the object's type
> | type(name, bases, dict) -> a new type
Read my blog! I depend on your acceptance of my opinion! I am interesting!
Follow me if you're into that sort of thing: http://www.twitter.com/ironfroggy
More information about the Python-list