This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author yselivanov
Recipients brett.cannon, larry, ncoghlan, r.david.murray, yselivanov
Date 2014-04-01.00:01:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>

Agreed on positional-only stuff.

> If arguments bound by position disappear from the signature, and those
> bound by keyword are mapped to keyword-only parameters with a default, we
> should get a valid and accurate signature.

But what about my example from the first message:

   def foo(a, b): pass
   foo_partial = functools.partial(foo, 'spam')

'foo_partial' now has the following signature: (a='spam', b); where 'a' is a positional_or_keyword parameter, i.e. you can still do 'foo_partial(10, 20)', or 'foo_partial(b=20, a=10)'.

(a='spam',  b) is not a valid python pure function signature, but is a perfectly valid signature of partial function. And since its arguments aren't positional-only, we shouldn't hide anything.

That's why I have this private '_partial_kwarg' attribute, which I don't like and want to remove by adding a PartialParameter subclass. Otherwise, we have something that is hidden and non-documented, but affects Parameter.__hash__ and some other logic.
Date User Action Args
2014-04-01 00:01:44yselivanovsetrecipients: + yselivanov, brett.cannon, ncoghlan, larry, r.david.murray
2014-04-01 00:01:43yselivanovsetmessageid: <>
2014-04-01 00:01:43yselivanovlinkissue21117 messages
2014-04-01 00:01:43yselivanovcreate