[Python-ideas] Addition to operator module: starcaller
Nick Coghlan
ncoghlan at gmail.com
Sun Jul 24 06:41:58 EDT 2016
On 22 July 2016 at 09:45, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Daniel Spitz wrote:
>>
>> I'm not sure and don't have a strong opinion about the original removal of
>> apply.
>
>
> I expect it was removed simply because the * and ** calling
> syntax makes it unecessary (before that was introduced,
> apply was the only way of getting that funcionality).
>
> If it's to be reintroduced, the operator module would seem
> to be the right place for it.
I guess folks doing higher order functions are already used to
importing the operator module for access to operator.add (etc), and
this is a pretty thin wrapper around the __call__ protocol (unlike
reduce(), which has no syntactic counterpart).
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-ideas
mailing list