3 ms·
Just for the record list comp scoping is fixed in python 3: $ python3 Python 3.2.1 (default, Aug 1 2011, 14:47:14) [GCC 4.2.1 (Based on Apple Inc
by llimllib 15y ago
Just for the record list comp scoping is fixed in python 3:
$ python3
Python 3.2.1 (default, Aug 1 2011, 14:47:14)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> x = 11
>>> [x for x in [1,2,3]]
[1, 2, 3]
>>> x
11