DebtcollectorOpenStack 技术债务收集集合
Debtcollector 是一个 Python 集合,它能通过非破坏性方式收集你的技术债务。
示例代码:
>>> from debtcollector import moves >>> import warnings >>> warnings.simplefilter('always') >>> class Dog(object): ... @property ... @moves.moved_property('bark') ... def burk(self): ... return self.bark ... @property ... def bark(self): ... return 'woof' ... >>> d = Dog() >>> d.burk__main__:1: DeprecationWarning: Property 'Dog.burk' has moved to 'Dog.bark''woof' >>> d.bark'woof'
评论