V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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 · Nov 10, 2012 · 4029 views
    This topic created in 4916 days ago, the information mentioned may be changed or developed.
    差点以为穿越, 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 replies    1970-01-01 08:00:00 +08:00
    timonwong
        1
    timonwong  
       Nov 10, 2012
    擦,这太YD了,果断收藏……

    PS 协议真疼。。。
    ledzep2
        2
    ledzep2  
       Nov 15, 2012
    going down
    Brutal
        3
    Brutal  
       Nov 15, 2012
    我去 这都行 谢谢lz啦!
    avatasia
        4
    avatasia  
       Nov 15, 2012
    这写的不累么?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   977 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 23:00 · PVG 07:00 · LAX 16:00 · JFK 19:00
    ♥ Do have faith in what you're doing.