On Mon, May 11, 2009 at 12:49 PM, Pascal Chambon
So the best, imo, would really be a keyword or some other form that reproduces with an easy syntax the "lambda-wrapping" we had.
If adding keywords is too violent, what would you people think of some notation similar to what we already have in the "function arguments world ", i.e stars ?
def func(a, c = *[]): pass
Having 1, 2 or 3 stars in the "default argument" expression, wouldn't it be OK ? I guess they have no meaning there at the moment, so we could give them one : "keep that code as a lamda functio nand evaluate it at each function call". Couldn't we ? The risk would be confusion with the other "*" and "**", but in this case we might put 3 stars (yeah, that's much but...).
Any comment on this ?
Seems unnecessarily confusing and sufficiently unrelated to the current use of stars in Python. -1 on this syntax. I'd look for a different punctuation/keyword. Cheers, Chris -- http://blog.rebertia.com