the documentation (https://docs.python.org/2/library/threading.html#threading.Timer) lists "threading.Timer" as a class. It is not, which means that (for example) you can not use it in isinstance(). "threading._Timer" is a class. "threading.Timer(...).__class__" is a class. "threading.Timer" is a function. >>> import threading >>> threading.Timer <function Timer at 0x7f99cae23848>
This is really a duplicate of Issue5831 which ended up being closed as a duplicate of Issue10968. The resolution of the latter issue was to change threading.Timer in Python 3.3 to actually be a class, a new feature. But it appears that along the way the issue of correcting the documentation for 2.7 was never addressed. Perhaps you could propose wording for a documentation patch?
Concise documentation isn't my forte, but my confusion would've been avoided with a note that "for historical reasons, threading.Timer is actually a factory function for the underlying class threading._Timer" or something along those lines.
Thanks, but we don't want to document an "internal only" name (which is what the leading underscore means in this case). It might be desirable to note that the name is a class in python3, I'm not sure.
New proposed patch. I understand not wanting to document an "internal only name", except that in this case it rather needs to be documented. I would strongly prefer Angad's patch to mine because you do, at times, need to know the actual name of the class being used -- and the documentation should not force people to dig through the source code to find that.