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