[Python-ideas] Make partial a built-in

אלעזר elazarg at gmail.com
Tue Sep 20 11:29:36 EDT 2016


Guido, can you please elaborate?

"What's going on" is usually that the same arguments are going to be passed
over and over again, and the programmer wanted to avoid this repetition.
The other option is adjusting the function to a predefined interface.

The alternative to partial is writing a closure in the form of a function,
that needs to be carefully inspected to verify that it is indeed just a
partial application and not something more complex. It has more opportunity
for introducing an error. And it's longer and adds distance between related
parts of the code.

Elazar

בתאריך יום ג׳, 20 בספט' 2016, 18:20, מאת Guido van Rossum ‏<
gvanrossum at gmail.com>:

> I am radically opposed to this proposal. Every time I see a partial
> application I wonder endlessly about what's going on.
>
> --Guido (mobile)
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160920/6ebc6c29/attachment-0001.html>


More information about the Python-ideas mailing list