Consider following code
class A():
print("hello")
value = 44
def __init__(self):
print("init")
if __name__ == "__main__":
pass
Output:
>>>
hello
>>>
The variable or expression... are inside class but outside any methods. By running this script I would expect that nothing happens because I didn't instantiate anything. Why is the interpreter executing it?