I guess when I considered myself a Pythonista I didn't ever notice how bonkers Python's scoping is
@cwebber *thinks with horror of list comprehension*
@Thib I haven't run into weird issues with list comprehension, but maybe if I looked again I'd realize them. But I think you could mostly do something with a list comprehension like interface using macros and lexical scope.
locals/globals though, what a weird design
@Thib Still true with for loops
>>> def foo():
... bar = "baz"
... for i in "beep":
... bar = i
... return bar
...
>>> foo()
'p'
@cwebber @Thib for me as for person who always lived in C-like languages, this looks perfectly fine and expected.