Alex Gusarov schrieb:
 class Event(object):

Always subclass object, unless you have a very compelling reason not to,
or you are subclassing something else.


I've thought that if I write

class Event:
    pass

, it'll be subclass of object too, I was wrong?


Yes. That is the somewhat unfortunate difference between new-style and old-style classes. Use new-style if you can, and that means that "object" must be part of the inheritance graph.

http://www.cafepy.com/article/python_types_and_objects/python_types_and_objects.html

Diez
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to