Kaydet (Commit) a4a8b820 authored tarafından Georg Brandl's avatar Georg Brandl

bug [ 1238170 ] threading.Thread uses {} as default argument

üst 8bfa8935
...@@ -374,9 +374,11 @@ class Thread(_Verbose): ...@@ -374,9 +374,11 @@ class Thread(_Verbose):
__exc_info = _sys.exc_info __exc_info = _sys.exc_info
def __init__(self, group=None, target=None, name=None, 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" assert group is None, "group argument must be None for now"
_Verbose.__init__(self, verbose) _Verbose.__init__(self, verbose)
if kwargs is None:
kwargs = {}
self.__target = target self.__target = target
self.__name = str(name or _newname()) self.__name = str(name or _newname())
self.__args = args self.__args = args
......
...@@ -168,6 +168,9 @@ Extension Modules ...@@ -168,6 +168,9 @@ Extension Modules
Library 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). - textwrap now processes text chucks at O(n) speed instead of O(n**2).
Patch #1209527 (Contributed by Connelly). Patch #1209527 (Contributed by Connelly).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment