[issue10918] **kwargs unnecessarily restricted in API
Adrian Dries
report at bugs.python.org
Sun Jan 16 16:49:52 CET 2011
New submission from Adrian Dries <adries at gmail.com>:
An API such as in, e.g. futures:
def submit(self, fn, *args, **kwargs):
pass
cannot be used thus:
submit(foo, 1, 2, fn=bar)
I can see two options: either mangle the named parameters:
def submit(__self, __fn, *args, **kwargs):
pass
Or fiddle with *args:
def submit(*args, **kwargs):
self, fn = args[:2]
args = args[2:]
----------
components: Library (Lib)
messages: 126367
nosy: avdd
priority: normal
severity: normal
status: open
title: **kwargs unnecessarily restricted in API
type: behavior
versions: Python 3.2
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10918>
_______________________________________
More information about the Python-bugs-list
mailing list