I refactor my old code and want to change the names of functions in accordance with pep8. But I want to maintain backward compatibility with old parts of system (a complete refa
While the other answers are definitely true, it could be useful to rename the function to the new name and create an old one which emits a warning:
def func_new(a): do_stuff() def funcOld(a): import warnings warnings.warn("funcOld should not be called any longer.") return func_new(a)