Renaming of functions with preservation of backward compatibility

后端 未结 4 1371
轻奢々
轻奢々 2021-02-19 15:12

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

4条回答
  •  梦如初夏
    2021-02-19 15:35

    As your question sounds very much like deprecation or similar, I'd like to strongly recommend the use of decorators for cleaner code. In fact, someone in another thread has already created this for you.

提交回复
热议问题