summaryrefslogtreecommitdiff
path: root/Doc/library/threading.rst
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-03-30 17:19:38 -0400
committerR David Murray <rdmurray@bitdance.com>2013-03-30 17:19:38 -0400
commitec65fac6e0b4ad6ce56ac1aaa33226f5f18f217e (patch)
tree2315de18766f661da28da09b0715832c9153f101 /Doc/library/threading.rst
parent73f95760a50e68eefa432934aff2f3ef1c4453d0 (diff)
downloadcpython-ec65fac6e0b4ad6ce56ac1aaa33226f5f18f217e.tar.gz
Issue #17435: Don't use mutable default values in Timer.
Patch by Denver Coneybeare with some test modifications by me.
Diffstat (limited to 'Doc/library/threading.rst')
-rw-r--r--Doc/library/threading.rst4
1 files changed, 3 insertions, 1 deletions
diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst
index f697cbb4de..1bcf0a2ea5 100644
--- a/Doc/library/threading.rst
+++ b/Doc/library/threading.rst
@@ -839,10 +839,12 @@ For example::
t.start() # after 30 seconds, "hello, world" will be printed
-.. class:: Timer(interval, function, args=[], kwargs={})
+.. class:: Timer(interval, function, args=None, kwargs=None)
Create a timer that will run *function* with arguments *args* and keyword
arguments *kwargs*, after *interval* seconds have passed.
+ If *args* is None (the default) then an empty list will be used.
+ If *kwargs* is None (the default) then an empty dict will be used.
.. versionchanged:: 3.3
changed from a factory function to a class.