[issue15185] Validate callbacks in 'contextlib.ExitStack.callback()'

Yury Selivanov report at bugs.python.org
Tue Jun 26 00:31:41 CEST 2012


New submission from Yury Selivanov <yselivanov at gmail.com>:

With this patch 'contextlib.ExitStack.callback(callback, *args, **kwds)' will validate that the passed callback actually accept the passed '*args' and '**kwds'.

P.S. If this patch comes through - I'll create two more issues for 'atexit.register' and 'unittest.TestCase.addCleanup'.  (I'll also look through the stdlib to find if there are some other places where this is needed.)

----------
components: Library (Lib)
files: contextlib.patch
keywords: patch
messages: 164021
nosy: Yury.Selivanov, ncoghlan
priority: normal
severity: normal
status: open
title: Validate callbacks in 'contextlib.ExitStack.callback()'
type: enhancement
versions: Python 3.3
Added file: http://bugs.python.org/file26159/contextlib.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15185>
_______________________________________


More information about the Python-bugs-list mailing list