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

能给 python 函数的每个参数增加 docstring 吗?

  •  
  •   qweweretrt515 · Nov 8, 2016 · 2157 views
    This topic created in 3515 days ago, the information mentioned may be changed or developed.

    好让我们 用 ide 写代码的时候,指着调用函数的地方,就可以显示出 每个参数的具体含义,而不是根据参数名来猜测

    3 replies    2016-11-08 22:56:31 +08:00
    bazingaterry
        1
    bazingaterry  
       Nov 8, 2016 via iPhone   ❤️ 1
    PyCharm 有这功能来着……
    qweweretrt515
        2
    qweweretrt515  
    OP
       Nov 8, 2016
    @bazingaterry 我一般用的 vs code pycharm 偶尔用
    ivechan
        3
    ivechan  
       Nov 8, 2016   ❤️ 1
    1. 在 function 的 docstring 里写, 参考 PEP-257 -> https://www.python.org/dev/peps/pep-0257/
    2. Type Hint, 参考 PEP-484 -> https://www.python.org/dev/peps/pep-0484/
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2996 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 14:43 · PVG 22:43 · LAX 07:43 · JFK 10:43
    ♥ Do have faith in what you're doing.