New submission from Martin Panter: This patch allows many context managers to accept keyword arguments called “func” and “self”. Current behaviour:
>>> with TestCase().subTest(func="blaua"): pass ... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3.4/contextlib.py", line 126, in helper return _GeneratorContextManager(func, *args, **kwds) TypeError: __init__() got multiple values for argument 'func' ---------- files: context-kw.patch keywords: patch messages: 244523 nosy: vadmium priority: normal severity: normal stage: patch review status: open title: Allow arbitrary keywords to @contextmanager functions type: behavior versions: Python 3.4, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file39571/context-kw.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24336> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com