New submission from Nick Coghlan <ncogh...@gmail.com>:

While discussing https://bugs.python.org/issue32145, I noticed that 
ExitStack.callback *always* adds a wrapper function, even when the `args` and 
`kwds` parameters are both empty.

For plain callbacks that aren't receiving any extra arguments, it would be 
better to skip adding the redundant wrapper function.

----------
messages: 309171
nosy: barry, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Skip creating redundant wrapper functions in ExitStack.callback
type: performance
versions: Python 3.7, Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32445>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to