behaviour of default values for class attributes differs from CPython #814
Closed
Description
If class attributes are used to store constants, it seems impossible to get the value after the file was compiled using mypyc.
Test case:
class Constants:
RED: str = "red"
BLUE: str = "blue"
GREEN: str = "green"
def main():
print(Constants.RED)
Result:
mypyc:
<attribute 'RED' of 'Constants' objects>
cpython:
red