The following code won’t be allowed in Java, but in python, it works fine:
```python
class A:
    A = 3

    def __init__(self):
        print(self.A)

    def p(self):
        print(self.A)
        self.A += 1


class B(A):
    def __init__(self):
        print(2)
        self.p()
        super().__init__()


B()
```

How can I understand this? Will it be a problem?
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to