This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author corey
Recipients corey
Date 2016-05-04.14:34:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1462372473.02.0.946073615941.issue26951@psf.upfronthosting.co.za>
In-reply-to
Content
```
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?
History
Date User Action Args
2016-05-04 14:34:33coreysetrecipients: + corey
2016-05-04 14:34:33coreysetmessageid: <1462372473.02.0.946073615941.issue26951@psf.upfronthosting.co.za>
2016-05-04 14:34:32coreylinkissue26951 messages
2016-05-04 14:34:32coreycreate