推荐学习书目
› 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
find456789
V2EX  ›  Python

写 Python 代码的时候,在 type hints 、mypy、pyright 应该选择哪一个呢?

  •  
  •   find456789 ·
    find456789 · Apr 3, 2019 · 2980 views
    This topic created in 2774 days ago, the information mentioned may be changed or developed.

    目前个人倾向 选择官方的 type hints

    这 3 个东西都可以让 python 代码变得健壮

    选择哪一个 最好呢? 理由是什么呢?

    谢谢

    4 replies  •  2019-04-28 23:26:52 +08:00
    aoe2ex
    aoe2ex
    Apr 3, 2019
    1
    pyright
    find456789
    find456789
    OP
    Apr 3, 2019
    2
    @aoe2ex 谢谢, 我再研究研究
    Trim21
    Trim21
    Apr 3, 2019
    3
    第一次听说 pyright 想看看, 发现是用 npm 安装的, 有毒啊...
    srlp
    srlp
    Apr 28, 2019 via iPhone❤️1
    4
    mypy 是兼容官方的 type hint 的 linter,配置使用这个即可。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1670 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 05:11 · PVG 13:11 · LAX 21:11 · JFK 00:11
    ♥ Do have faith in what you're doing.