add trickyscope.py

This commit is contained in:
neingeist 2017-11-02 02:51:11 +01:00
parent 99af24ce61
commit 8f12a6b88c

9
trickyscope.py Normal file
View file

@ -0,0 +1,9 @@
from __future__ import print_function
class TrickyScope:
a = 1
b = [a for i in range(1)]
# Does not work with Python 3:
print(type(TrickyScope.b))
assert TrickyScope.b == [1]