Alan Gauld via Tutor wrote:

> classes are objects too...

Also, classes are instances. Given

>>> class Foo:
...     pass
>>> foo = Foo()
>>> type(foo)
<class '__main__.Foo'>
>>> type(Foo)
<class 'type'>

what is the type of the type of the type ... of foo?
The answer is a circular definition that you cannot spell in Python itself:

>>> type(type)
<class 'type'>

The type of type is... type. Put the other way round: like ordinary classes 
type is an instance of type.

Tutor maillist  -
To unsubscribe or change subscription options:

Reply via email to