On Jun 23, 2019, at 17:01, Steven D'Aprano <[email protected]> wrote:
> 
>> On Sun, Jun 23, 2019 at 03:22:37PM -0400, James Lu wrote:
>> Make $ a valid identifier and a singleton. 
>> 
>> $ is a useful placeholder in [].
>> 
>> Possible function partial syntax:
>> 
>> def foo(x, y):
>>    print(x, y)
>> 
>> partialized = foo[$, 10]
> 
> I don't think that creating partial functions is important enough to:
> 
> 1. make partial functions a built-in language feature;
> 2. using syntax (square brackets);
> 3. and require a new built-in singleton.
> 
> 
> I think that functools.partial is missing two features:
> 
> - the ability to close over positional parameters from the right, 
>  rather than the left;
> 
> - the ability to skip parameters.
> 
> The first could be solved with a "rpartial" function, and the second by 
> using ellipsis ... as a placeholder, or a named constant in the 
> functools module.

I’m pretty sure there are multiple improved-partial projects on PyPI. Maybe 
just picking out one and adding a link to it from the functools docs is 
sufficient?

_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/5ZNUWJJ27H2MYIDRTGBFCP4IEMEA7AAI/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to