codon
codon copied to clipboard
Class variable scoping doesn't match python3
class A:
x = 2
def __init__(self):
self.x = self.x + 1
print(A().x)
python3 says "3" codon says:
x.py:4:9-13: error: 'A' object has no attribute 'x' ╰─ x.py:5:7-12: error: during the realization of init(self: A)