23 May
2018
23 May
'18
2:54 p.m.
On 2018-05-22 14:32, Kirill Balunov wrote:
# in global scope everything works ok since locals is globals >>> while len( this( val = dummy() ) ) >= 0: ... print(val) [0, 1] [0, 1, 2] [0, 1, 2, 3]
Interesting! Although the example with a len() and mutable default arguments obscured the utility, I thought. Also, why limit it to one assignment? Liked Terry's suggestions for name. The name that jumped into my brain as I read was a reuse of the locals() or globals() callable with key words, that would change their behavior to what you suggest. -Mike