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. -- Steven _______________________________________________ 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/TVNCM7XWIP33Q3435PXOHWIFTPMJ6PCX/ Code of Conduct: http://python.org/psf/codeofconduct/
