>>> from dis import dis >>> dis(greet) 4 0 LOAD_GLOBAL 0 (print) 2 LOAD_CONST 1 ('Hello ') 4 LOAD_GLOBAL 1 (name) 6 BINARY_ADD 8 CALL_FUNCTION 1 10 POP_TOP 12 LOAD_CONST 0 (None) 14 RETURN_VALUE >>> dis(greet1.greet) 4 0 LOAD_GLOBAL 0 (print) 2 LOAD_CONST 1 ('Hello ') 4 LOAD_GLOBAL 1 (name) 6 BINARY_ADD 8 CALL_FUNCTION 1 10 POP_TOP 12 LOAD_CONST 0 (None) 14 RETURN_VALUE
So with this we can skip the class definition, having "self" as the first parameter of every function and prefixing all class variables with "self".
That leads to so much cleaner code!