[Python-Dev] Aside: apply syntax
Guido van Rossum
guido at CNRI.Reston.VA.US
Fri Jun 11 14:31:51 CEST 1999
> I've seen repeatedly on c.l.p a suggestion to modify the syntax & the core
> to allow * and ** in function calls, so that:
>
> class SubFoo(Foo):
> def __init__(self, *args, **kw):
> apply(Foo, (self, ) + args, kw)
> ...
>
> could be written
>
> class SubFoo(Foo):
> def __init__(self, *args, **kw):
> Foo(self, *args, **kw)
> ...
>
> I really like this notion, but before I poke around trying to see if it's
> doable, I'd like to get feedback on whether y'all think it's a good idea
> or not. And if someone else wants to do it, feel free -- I am of course
> swamped, and I won't get to it until after rich comparisons.
>
> FWIW, apply() is one of my least favorite builtins, aesthetically
> speaking.
I like the idea, but it would mean a major reworking of the grammar
and the parser. Can I persuade you to keep this on ice until 2.0?
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev
mailing list