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

你有没有很想吐槽的超级坑的 py 标准库 module?

  •  1
     
  •   ThunderEX · 2014-12-03 15:59:59 +08:00 · 2932 次点击
    这是一个创建于 3403 天前的主题,其中的信息可能已经有所发展或是发生改变。
    比如datetime赶脚还不如用第三方的……
    binascii赶脚性能好渣……
    9 条回复    2014-12-19 16:03:06 +08:00
    Fikhtengol
        1
    Fikhtengol  
       2014-12-03 17:08:52 +08:00
    datetime 有什么好用的第三方?
    wibile
        2
    wibile  
       2014-12-03 17:10:49 +08:00
    @Fikhtengol arrow
    EPr2hh6LADQWqRVH
        3
    EPr2hh6LADQWqRVH  
       2014-12-03 17:12:50 +08:00
    smtpd和email高度耦合,一个把email地址两边尖括号去掉的操作不知实例化了多少东西
    huigeer
        4
    huigeer  
       2014-12-03 17:39:02 +08:00
    php trim($str, '[');
    php trim($str, ']');
    c
        5
    c  
       2014-12-03 17:41:26 +08:00
    >>> "[sdfsdf]".strip('[]')
    'sdfsdf'
    c
        6
    c  
       2014-12-03 17:43:18 +08:00
    @huigeer
    >>> "[sdfsdf]".strip('[]')
    'sdfsdf'
    mengzhuo
        7
    mengzhuo  
       2014-12-04 11:38:44 +08:00
    @avastms

    不同意的你观点
    email一个处理email的库
    smtpd一个收信的服务
    哪里重合了?

    RCPT的规则简单了就是去<> 复杂了就呵呵了
    feisan
        8
    feisan  
       2014-12-08 16:14:48 +08:00
    minidom
    ming2281
        9
    ming2281  
       2014-12-19 16:03:06 +08:00
    os与os.path是对文件和目录进行一系列操作,有时候你以为一个方法在os里面,其实它在os.path里面;
    有时候你以为一个方法在os.path里面,但是它在os里面.
    有时候你以为文件的的复制方法在os和os.path的其中一个里面,但是都不在!-->其实它在shutil里面!

    TM dou wo?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4856 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 09:54 · PVG 17:54 · LAX 02:54 · JFK 05:54
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.