
I'm very confused about the apparent convergence on the token "=>" for deferred parameter assignment. 1) As others have said, it sure feels like the arrow is going the wrong way. But the bigger question I have is with the similarity to lambda: 2) As I understand it, there's a good chance that "=>" will be adopted to mean defining an anonymous function, i.e. a new spelling of lambda. But we can use lambda as default arguments (indeed, that's a common idiom), and, presumably, lambda will be able to use deferred defaults. So there's a reasonable probability that the same token will be used in the same context, meaning two different things, maybe even at the same time. I'm sure the parser will be able to figure it out, but I really don't get why folks think this is a good idea for human readability. Can someone explain? On the other hand, others have suggested :=, which is could also be used as part of the expression, so not a good idea either :-( BTW: was it intentional that this: In [8]: def fun(x, y=(z:=3)): ...: print(x,y,z) ...: ...: adds z to the function namespace -- sure seems odd to me. In [9]: fun(2) 2 3 3 -CHB -- Christopher Barker, PhD (Chris) Python Language Consulting - Teaching - Scientific Software Development - Desktop GUI and Web Development - wxPython, numpy, scipy, Cython