DebtcollectorOpenStack 技術(shù)債務(wù)收集集合
Debtcollector 是一個(gè) Python 集合,它能通過非破壞性方式收集你的技術(shù)債務(wù)。
示例代碼:
>>> 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'評(píng)論
圖片
表情
