Answer the question
In order to leave comments, you need to log in
Is it true that a class attribute overrides an object attribute?
Is it true that a class attribute overrides an object attribute?
Answer the question
In order to leave comments, you need to log in
Take and check
>>> class C:
... x = 42
... def __init__(self):
... self.x = 13
...
>>> i = C()
>>> i.x
13
>>> C.x
42
>>>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question