Python 变身 Ruby? ctypes扩充__dict__

2012-11-10 01:41:00 +08:00
 HowardMei
差点以为穿越, https://github.com/gabrielfalcao/sure/

import sure

(4).should.be.equal(2 + 2)
(7.5).should.eql(3.5 + 4)
(2).should.equal(8 / 4)
(3).shouldnt.be.equal(5)
"Awesome ASSERTIONS".lower().split().should.equal(['awesome', 'assertions'])


@Brutal 同学要的类js prototype就这样说有就有了 :P
https://github.com/gabrielfalcao/sure/blob/master/sure/magic.py
3420 次点击
所在节点    Python
4 条回复
timonwong
2012-11-10 02:05:29 +08:00
擦,这太YD了,果断收藏……

PS 协议真疼。。。
ledzep2
2012-11-15 12:15:11 +08:00
going down
Brutal
2012-11-15 14:52:00 +08:00
我去 这都行 谢谢lz啦!
avatasia
2012-11-15 14:58:00 +08:00
这写的不累么?

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/52258

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX