Message215295
I believe Yury already figured out what I meant, but to make it entirely clear, after the change, this example:
def foo(a, b): pass
foo_partial = functools.partial(foo, 'spam')
foo_partial2 = functools.partial(foo, a='spam')
Should lead to the following signature for both "foo_partial" and "foo_partial2":
(b, *, a='spam')
That accurately indicates that "a" is now effectively a keyword only parameter - the first supplied positional argument will map to "b", and attempting to supply *two* positional arguments will fail.
Correctly handing *args may get a little interesting, but should be feasible. |
|
Date |
User |
Action |
Args |
2014-04-01 05:38:29 | ncoghlan | set | recipients:
+ ncoghlan, brett.cannon, larry, r.david.murray, yselivanov |
2014-04-01 05:38:29 | ncoghlan | set | messageid: <1396330709.94.0.79456526935.issue21117@psf.upfronthosting.co.za> |
2014-04-01 05:38:29 | ncoghlan | link | issue21117 messages |
2014-04-01 05:38:29 | ncoghlan | create | |
|