R. David Murray <rdmur...@bitdance.com> added the comment:

The Timer function is a simple wrapper for creating an instance of the
_Timer class.

The Timer class was proposed in Issue428326 by Itamar and applied
by Martin in r22972.  In the original patch the class was exposed as
Timer.  Martin's commit introduced the Timer function and _Timer class
name.  The documentation provided by Itamar was not updated to match.

The change would appear to intentionally make it difficult to create
Timer subclasses.

The Timer function/class was added in 2001 and there are no complaints
that Thread can't be subclassed in the tracker.  So perhaps a doc patch
is appropriate...but that would leave Timer with a name that is not PEP
8 compliant.

I think I'd prefer deleting the function and naming the class Timer,
so that it has a PEP 8 compliant name. It seems unlikely that any user
code would depend on Timer being a function.

Martin, do you have any memory of why you made Timer a function?  Was it
just that it would be pretty pointless to subclass it?

----------
components: +Library (Lib)
keywords: +easy
nosy: +loewis, r.david.murray
priority:  -> low
versions:  -Python 2.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5831>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to