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

大家写代码时“符号的前后”加空格的吗?比如是 a = 0 还是 a=0?

  •  
  •   zictos · Apr 21, 2020 · 15308 views
    This topic created in 2387 days ago, the information mentioned may be changed or developed.

    感觉不加空格写代码的速度更快,如果是为阅读性考虑,可以在代码写好后通过 ide 格式化代码

    108 replies  •  2020-04-22 20:52:50 +08:00
    1  2  
    ❮ ❯
    ShundL
    ShundL
    Apr 22, 2020
    101
    @ShundL #95 回复错了。。。
    ZehaiZhang
    ZehaiZhang
    Apr 22, 2020
    102
    靠格式化规范
    lzihua
    lzihua
    Apr 22, 2020
    103
    输入的时候 打空格
    fordoo
    fordoo
    Apr 22, 2020
    104
    go 不存在这个问题
    biguokang
    biguokang
    Apr 22, 2020
    105
    我喜欢 a= 0 或者 a =0
    xpresslink
    xpresslink
    Apr 22, 2020
    106
    一直用 pycharm 提交前会习惯性地 Ctrl+A 然后 Ctrl+Atl+L ...
    craiiz
    craiiz
    Apr 22, 2020
    107
    追求页面右上角一个绿色的“✔”
    JacobXia
    JacobXia
    Apr 22, 2020
    108
    写完后通过 ide 的格式化容易改到别的代码,提交代码时容易造成冲突。我这带新人前期写代码时都是写好后直接按 `crtl+alr+l`去格式化代码,没有去手动选中自己写的那部分代码。这样在提交代码时容易影响到其他人的代码,在合并时会有一堆冲突
    1  2  
    ❮ ❯
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3074 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 414ms · UTC 12:15 · PVG 20:15 · LAX 04:15 · JFK 07:15
    ♥ Do have faith in what you're doing.