eobjects::cactus:Python中的优雅对象

时间:2021-04-06 19:54:06
【文件属性】:
文件名称:eobjects::cactus:Python中的优雅对象
文件大小:3KB
文件格式:ZIP
更新时间:2021-04-06 19:54:06
python3 elegantobjects :cactus: 客体 :waving_hand: 嗨, eobjects是一个库,可以帮助您根据 :cactus: Python中的优雅对象原则。 现在这只是一个概念,但是在0.1.0版中,代码应如下所示: 对象实例化: @ eobject class Diff : first : int second : int def match ( self ) -> bool : return self . first == self . second if __name__ == "__main__" : diff = Diff ( first = 1 , second = 2 ) print ( diff . match () ) # False print ( diff . with ( first = 2 ). match () ) # True print ( d
【文件预览】:
eobjects-master
----LICENSE(1KB)
----README.md(755B)
----.gitignore(2KB)

网友评论