On Jul 31, 11:37 am, Nikolaus Rath <[EMAIL PROTECTED]> wrote:
> So why does Python distinguish between e.g. the type 'int' and the
> class 'myclass'? Why can't I say that 'int' is a class and 'myclass'
> is a type?

I might be wrong here, but I think the point is that there is no
distinction. A class (lets call it SomeClass for this example) is an
object of type 'type', and an instance of a class is an object of type
'SomeClass'.

So int is a type, but if you have an int variable, its type is int.

Same for your classes.

This is, ignoring old style classes. Make sure all your classes
inherit from object to get new style classes.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to