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
leisurelylicht
V2EX  ›  Python

What the f*ck Python !

  •  3
     
  •   leisurelylicht · Nov 28, 2018 · 5893 views
    This topic created in 2712 days ago, the information mentioned may be changed or developed.

    看到一个有趣的 Python 项目, 专门介绍 python 里那些奇奇怪怪的语言坑。

    觉得很有意思,正好最近在学英语,就翻译了一份中文版.

    欢迎大家支持,纠错!顺便来波 star :-)

    28 replies    2018-11-29 16:03:47 +08:00
    kepenj
        1
    kepenj  
       Nov 28, 2018
    亦可赛艇
    hk3475
        2
    hk3475  
       Nov 28, 2018   ❤️ 1
    感觉写一版 javascript 的能长一倍 哈哈
    verzhshq
        3
    verzhshq  
       Nov 28, 2018   ❤️ 1
    标题配合楼主头像食用味道更佳
    leisurelylicht
        4
    leisurelylicht  
    OP
       Nov 28, 2018
    @hk3475 事实上这个项目的原作者就是受到类似的 js 项目的启发才做了这个项目,文章最后有写
    1iuh
        5
    1iuh  
       Nov 28, 2018
    很有趣,感谢楼主翻译,已 star。
    hflyf123
        6
    hflyf123  
       Nov 28, 2018
    已 star,感谢楼主
    wohenyingyu03
        7
    wohenyingyu03  
       Nov 28, 2018
    看了前几个例子,java 不是也一样嘛,猜猜下面输出什么?

    Integer c=2;
    Integer d=2;
    Integer u=1000;
    Integer i=1000;
    int o=1000;
    System.out.println(c==d);
    System.out.println(u==i);
    System.out.println(o==i);
    System.out.println(o==u);
    Vegetable
        8
    Vegetable  
       Nov 28, 2018   ❤️ 6
    拜托别让出面试题的人看到这些
    andyL
        9
    andyL  
       Nov 28, 2018   ❤️ 1
    666666 看了几个例子 就觉的很不一般
    ddzzhen
        10
    ddzzhen  
       Nov 28, 2018
    有点意思
    chanchan
        11
    chanchan  
       Nov 28, 2018
    @wohenyingyu03 不想回答,反正就是 integerCache 相关的
    zcmxw1
        12
    zcmxw1  
       Nov 28, 2018 via Android
    我觉得上边 java 这几个知识点还是有必要掌握的
    glacer
        13
    glacer  
       Nov 28, 2018   ❤️ 1
    @wohenyingyu03 小整数缓存我一个不是主写 Java 的都知道
    JCZ2MkKb5S8ZX9pq
        14
    JCZ2MkKb5S8ZX9pq  
       Nov 28, 2018
    1002xin
        15
    1002xin  
       Nov 28, 2018
    666666
    0x5f
        16
    0x5f  
       Nov 28, 2018
    有意思 star 了
    di94sh
        17
    di94sh  
       Nov 28, 2018 via Android
    这些坑只要理解名字空间,就能看懂一大半。至于 return finally return 这种。估计没人这样用
    www5070504
        18
    www5070504  
       Nov 28, 2018
    感觉这个作者相当爱 python...
    codechaser
        19
    codechaser  
       Nov 28, 2018 via Android
    没看到链接啊
    waytoexplorewhat
        20
    waytoexplorewhat  
       Nov 28, 2018
    感谢楼主分享这个有意思的项目,翻译有心了
    likuku
        21
    likuku  
       Nov 28, 2018
    竟然是另起炉灶,而不是从原项目 fork 出来而新增加一个中文版 .md 来自己维护...
    likuku
        22
    likuku  
       Nov 28, 2018
    这个真是棒极了!比前几天吵的火热的那个 “将代码翻译成中文” 的项目 有意义得多啊...
    wspsxing
        23
    wspsxing  
       Nov 28, 2018 via Android
    真有爱啊,可惜我已经离开了
    fanhaipeng0403
        24
    fanhaipeng0403  
       Nov 28, 2018
    廖良开
    wohenyingyu03
        25
    wohenyingyu03  
       Nov 29, 2018
    @glacer 我没有说你不知道啊?本来就是常识啊,我只是问是不是应该写一篇 what the f**ck java ?
    leisurelylicht
        26
    leisurelylicht  
    OP
       Nov 29, 2018
    @Vegetable 😂😂😂


    @di94sh 我觉得这篇文章的意义就在于让你知道有这样的写法,但平时最好别用


    @likuku 另起炉灶的初衷时希望 commit 记录能保持纯净,因为我是每个列子提一个 commit,这样当你觉得我的翻译看不懂的时候翻一下 commit 记录就能很容易的获取原文与翻译对照的页面,而不用你在两个页面里来回找了。
    leisurelylicht
        27
    leisurelylicht  
    OP
       Nov 29, 2018
    @codechaser “中文版” 那三个字就是链接,直接点就可以了。
    8355
        28
    8355  
       Nov 29, 2018
    @hk3475 #2 IE6 7 8 9
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2507 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 73ms · UTC 12:32 · PVG 20:32 · LAX 05:32 · JFK 08:32
    ♥ Do have faith in what you're doing.