推荐学习书目
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 · 14322 views
    This topic created in 2248 days ago, the information mentioned may be changed or developed.

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

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