From a4a8b820aa32638e9f65efcb73e7559dad76028f Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Fri, 15 Jul 2005 09:13:21 +0000 Subject: [PATCH] bug [ 1238170 ] threading.Thread uses {} as default argument --- Lib/threading.py | 4 +++- Misc/NEWS | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Lib/threading.py b/Lib/threading.py index cbcc1f91b2..fe4490fa3a 100644 --- a/Lib/threading.py +++ b/Lib/threading.py @@ -374,9 +374,11 @@ class Thread(_Verbose): __exc_info = _sys.exc_info def __init__(self, group=None, target=None, name=None, - args=(), kwargs={}, verbose=None): + args=(), kwargs=None, verbose=None): assert group is None, "group argument must be None for now" _Verbose.__init__(self, verbose) + if kwargs is None: + kwargs = {} self.__target = target self.__name = str(name or _newname()) self.__args = args diff --git a/Misc/NEWS b/Misc/NEWS index 2c0207f044..7c7c51dbbe 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -168,6 +168,9 @@ Extension Modules Library ------- +- Bug #1238170: threading.Thread.__init__ no longer has "kwargs={}" as a + parameter, but uses the usual "kwargs=None". + - textwrap now processes text chucks at O(n) speed instead of O(n**2). Patch #1209527 (Contributed by Connelly). -- 2.40.0