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

在遵守 pep8 的基础上,如何使代码保持一定的风格?

  •  
  •   liuhao2050qq · Oct 14, 2016 · 3272 views
    This topic created in 3641 days ago, the information mentioned may be changed or developed.
    如题,还有怎么样让自己的代码 让别人看起来也很 nice ?
    3 replies  •  2016-10-19 16:21:55 +08:00
    TKKONE
        1
    TKKONE  
    PRO
       Oct 14, 2016
    恰到好处的注释和变量命名
    Allianzcortex
        2
    Allianzcortex  
       Oct 14, 2016 via iPhone
    别用双下划线, single underscore 还不够嘛,一定要有 doc string
    R4rvZ6agNVWr56V0
        3
    R4rvZ6agNVWr56V0  
       Oct 19, 2016
    个人认为方法和函数命名太重要了
    感受下: human_change_the_name(name) vs human_name(name)
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2076 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 00:46 · PVG 08:46 · LAX 17:46 · JFK 20:46
    ♥ Do have faith in what you're doing.