You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
185 B
Python
10 lines
185 B
Python
7 years ago
|
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]
|