V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
HowardMei
V2EX  ›  Python

Python 变身 Ruby? ctypes扩充__dict__

  •  
  •   HowardMei · 2012-11-10 01:41:00 +08:00 · 3413 次点击
    这是一个创建于 4185 天前的主题,其中的信息可能已经有所发展或是发生改变。
    差点以为穿越, 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
    4 条回复    1970-01-01 08:00:00 +08:00
    timonwong
        1
    timonwong  
       2012-11-10 02:05:29 +08:00
    擦,这太YD了,果断收藏……

    PS 协议真疼。。。
    ledzep2
        2
    ledzep2  
       2012-11-15 12:15:11 +08:00
    going down
    Brutal
        3
    Brutal  
       2012-11-15 14:52:00 +08:00
    我去 这都行 谢谢lz啦!
    avatasia
        4
    avatasia  
       2012-11-15 14:58:00 +08:00
    这写的不累么?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5737 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 06:09 · PVG 14:09 · LAX 23:09 · JFK 02:09
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.