Considering the following:
class test:
att = 7
def print_class(class_instance):
print(class_instance.att)
if (__name__ == '__main__'):
t = test()
print_class (t)
print_class
expects a class test
instance as a parameter, but this is not typed.
Now I'd like to rename by refactoring att
However,
print(class_instance.att)
will not be renamed, as the editor has no clue this is the same attribute. This will be discovered only at run time.
Is there a way to overcome this?