11 ms·
Yes. Scopes are complicated e.g., class Foo: a = [1,2,3] b = [4,5,6] c = [x * y for x in a for y in b] that lead
by d0mine 4y ago
Yes. Scopes are complicated e.g.,
class Foo:
a = [1,2,3]
b = [4,5,6]
c = [x * y for x in a for y in b]
that leads to NameError: name 'b' is not defined https://bugs.python.org/issue3692 https://bugs.python.org/issue3692