[Python-ideas] functools.partial

Nick Coghlan ncoghlan at gmail.com
Sat Jun 9 02:17:24 CEST 2012


On Jun 9, 2012 6:08 AM, "Devin Jeanpierre" <jeanpierreda at gmail.com> wrote:
>
> On Thu, Jun 7, 2012 at 11:40 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> > If you dig up some of the older PEP 362 discussions, you'll find that
> > allowing developers to reduce this problem over time is the main
> > reason the Signature.bind() method was added to the PEP. While I
> > wouldn't recommend it for the base partial type, ... <SNIP>
>
> Why not? It seems like a good idea all around.

Speed, complexity and backwards compatibility. With a layered API, users
can choose whether they want to do early checks or not. If we build it in,
you can't avoid it when you prefer the delayed error to checking the
arguments twice.

Cheers,
Nick.

--
Sent from my phone, thus the relative brevity :)
>
> -- Devin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120609/26561522/attachment.html>


More information about the Python-ideas mailing list