Xiang Zhang added the comment: This is by design in 3.x. You can refer #11796 for explanation.
---------- nosy: +xiang.zhang resolution: -> not a bug stage: -> resolved status: open -> closed superseder: -> Comprehensions in a class definition mostly cannot access class variable _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29008> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com