Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Let's got with lambda instead of functools.partial
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
  • Loading branch information
danielhollas and AlexWaygood authored Jan 24, 2024
commit e76cec2d321817c0914b7693dc7c1fac98bdc67b
4 changes: 1 addition & 3 deletions Lib/threading.py
Original file line number Diff line number Diff line change
Expand Up @@ -1629,9 +1629,7 @@ def _register_atexit(func, *arg, **kwargs):
if _SHUTTING_DOWN:
raise RuntimeError("can't register atexit after shutdown")

import functools
call = functools.partial(func, *arg, **kwargs)
_threading_atexits.append(call)
_threading_atexits.append(lambda: func(*arg, **kwargs))
Comment thread
ericsnowcurrently marked this conversation as resolved.


from _thread import stack_size
Expand Down