class Parent(object): class_var = 'parent_class_var' @classmethod def class_method(cls): print('cls: {}'.format(cls)) print("class_var: {}".format(cls.class_var)) @staticmethod def static_method(raw_str): print(raw_str.strip()) if __name__ == '__main__': raw_str = 'He has been fired\n' # cls: <class '__main__.Parent'> # class_var: parent_class_var Parent.class_method() # He has been fired Parent.s