I am trying to understand class properties in Python OO (Object Oriented).
Let's say I have the following code.
class Testing():
surname = "Doe"
def __init__(self):
print(surname)
If we print surname
, as shown above, it will throw the following error: NameError: name 'surname' is not defined
. So, how is this class property accessible from outside or inside the class?