This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients denversc, gvanrossum, loewis, r.david.murray, terry.reedy
Date 2013-03-28.02:14:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1364436862.01.0.527534525122.issue17435@psf.upfronthosting.co.za>
In-reply-to
Content
The reported behavior is not a bug by our usual standards. The code is exactly as documented.
manual: class threading.Timer(interval, function, args=[], kwargs={})
docstring: t = Timer(30.0, f, args=[], kwargs={})

Threading is not a beginner module. Any competent Python programmer who reads either of the above, or the code line you quoted, would expect exactly the behavior you report. I think we should presume that people who monkey-patch the class, which is an unusual thing to do, know what they are doing. The patch would break any such intentional usage. If the signature were to be changed, there should be a deprecation period first, preferably with a DeprecationWarning for mutation either through an instance or through .__init__.

I do not see anything special about this particular function. If we change this use of [] and {} as defaults, then we should look at all such uses in the stdlib -- after pydev discussion. But I currently think we should leave well enough alone.

The Timer class was added in Sept. 2001, rev 19727, issue #428326. The patch was written by Itamar Shtull-Trauring, approved by Guido, and reviewed and committed by Martin.
History
Date User Action Args
2013-03-28 02:14:22terry.reedysetrecipients: + terry.reedy, gvanrossum, loewis, r.david.murray, denversc
2013-03-28 02:14:22terry.reedysetmessageid: <1364436862.01.0.527534525122.issue17435@psf.upfronthosting.co.za>
2013-03-28 02:14:21terry.reedylinkissue17435 messages
2013-03-28 02:14:21terry.reedycreate