Skip to content

Commit

Permalink
Let's got with lambda instead of functools.partial
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Waygood <[email protected]>
  • Loading branch information
danielhollas and AlexWaygood authored Jan 24, 2024
1 parent b70b7e5 commit e76cec2
Showing 1 changed file with 1 addition and 3 deletions.
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))


from _thread import stack_size
Expand Down

0 comments on commit e76cec2

Please sign in to comment.