[Python-ideas] Default arguments in Python - the return - running out of ideas but...

spir denis.spir at free.fr
Fri May 15 17:51:31 CEST 2009


Le Fri, 15 May 2009 13:38:43 +1000,
Steven D'Aprano <steve at pearwood.info> s'exprima ainsi:

> Just out of curiosity, what do you see as the drawbacks? The ones that 
> come to my mind are:
> 
[...]

> * requires people to learn one more feature 
> (so newbies will still be confused that def f(x=[]) doesn't behave as 
> they expect).
> 
That's the relevant drawback for me.
A solution that does not solve the issue. A new syntactic pattern to allow call time evaluation of defaults is a (costly) solution for people who don't need it. 

Denis
------
la vita e estrany



More information about the Python-ideas mailing list