[Python-ideas] Addition to operator module: starcaller

Brendan Barnwell brenbarn at brenbarn.net
Sat Jul 30 01:57:14 EDT 2016


On 2016-07-29 19:59, Michael Selik wrote:
> On Fri, Jul 22, 2016 at 12:52 AM Greg Ewing <greg.ewing at canterbury.ac.nz
> <mailto: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.
>
>
> If it goes in the operator module, then the name ``operator.starcall``
> seems better than ``starcaller``. I'd say ``operator.unpack`` would be
> better, except for the confusion between unpacking assignment and
> unpacking as arguments. I suppose ``operator.apply`` would be OK, too.
> Is there a better vocabulary word for unpack-as-args?

	Why not just operator.call?  I suppose actually operator.caller would 
be more consistent with the existing attrgetter and methodcaller?

-- 
Brendan Barnwell
"Do not follow where the path may lead.  Go, instead, where there is no 
path, and leave a trail."
    --author unknown


More information about the Python-ideas mailing list