[Python-ideas] Syntax for late-binding of arguments [was: Default arguments ...]
spir
denis.spir at free.fr
Fri May 15 19:26:34 CEST 2009
Le Sat, 16 May 2009 00:33:20 +1000,
Nick Coghlan <ncoghlan at gmail.com> s'exprima ainsi:
> It's not the object that is being marked as special: it's the expression
> to create the object. The new syntax is about delaying evaluation of
> that expression - the parameter itself is perfectly normal, as is the
> object that is ultimately bound to it. But moving the default argument
> evaluation to call time instead of definition time - that's special.
I rather agree. Then we should mark the binding sign '=' as special (not the parameter / the object)! E.g.
def f(arg &= [])
or
def f(arg @= [])
I looks a bit strange, but we have augmented assignment already.
Denis
------
la vita e estrany
More information about the Python-ideas
mailing list