[issue10968] Timer class inheritance issue

Amaury Forgeot d'Arc report at bugs.python.org
Fri Jan 21 13:10:37 CET 2011


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

It seems to be by design: from the documentation:
http://docs.python.org/py3k/library/threading.html
"Timer is a subclass of Thread", and a Thread subclass should "only override the __init__() and run() methods".

What are you trying to do here? overriding run() is probably wrong; and overriding __init__ is better done by passing the correct parameters to threading.Timer().

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10968>
_______________________________________


More information about the Python-bugs-list mailing list