Message264819
```
class A:
B = range(10)
C = frozenset([4, 5, 6])
D = list(i for i in B)
E = list(i for i in B if i in C)
```
```
coreyf@frewbook-pro /tmp [1]> python3 a.py
Traceback (most recent call last):
File "a.py", line 1, in <module>
class A:
File "a.py", line 5, in A
E = list(i for i in B if i in C)
File "a.py", line 5, in <genexpr>
E = list(i for i in B if i in C)
NameError: name 'C' is not defined
```
Why should I be able to access B but not C? |
|
Date |
User |
Action |
Args |
2016-05-04 14:34:33 | corey | set | recipients:
+ corey |
2016-05-04 14:34:33 | corey | set | messageid: <1462372473.02.0.946073615941.issue26951@psf.upfronthosting.co.za> |
2016-05-04 14:34:32 | corey | link | issue26951 messages |
2016-05-04 14:34:32 | corey | create | |
|