PyCharm 设置 Tabs and Indents

PyCharm 设置 Tabs and Indents

  • [1. Tabs and Indents](#1. Tabs and Indents)
  • [2. Show whitespaces](#2. Show whitespaces)
  • [3. Google Python Style Guide - 3.4 Indentation](#3. Google Python Style Guide - 3.4 Indentation)
  • References

1. Tabs and Indents

File -> Settings -> Editor -> Code Style -> Python

2. Show whitespaces

3. Google Python Style Guide - 3.4 Indentation

https://google.github.io/styleguide/pyguide.html

Indent your code blocks with 4 spaces.

Never use tabs. Implied line continuation should align wrapped elements vertically, or use a hanging 4-space indent. Closing (round, square or curly) brackets can be placed at the end of the expression, or on separate lines, but then should be indented the same as the line with the corresponding opening bracket.

使用 4 个空格缩进代码块,永远不要用 Tabs。

References

1\] Yongqiang Cheng (程永强), \[2\] Google Python Style Guide,

相关推荐
QQ_19632884756 天前
Python-flask框架西山区家政服务评价系统网站设计与开发-Pycharm django
python·pycharm·flask
闪电橘子12 天前
Pycharm运行程序报错 Process finished with exit code -1066598273 (0xC06D007F)
ide·python·pycharm·cuda
我要七分甜12 天前
Pycharm中Anaconda的详细配置过程
python·pycharm
Franklin12 天前
2025-11-28日,天塌了,Pycharm将不开源了!!最后一个开源社区版本2025.2.5
ide·python·pycharm
wx_bishe28812 天前
python社区流浪动物猫狗救助救援网站_4a4i2--论文_pycharm django vue flask
python·pycharm·django·毕业设计
澾慟12 天前
PyCharm Remote Interpreter连接远程服务器运行IndexTTS2
pycharm· indextts2· remote interpreter
智慧地球(AI·Earth)12 天前
在Windows上使用Claude Code并集成到PyCharm IDE的完整指南
ide·人工智能·windows·python·pycharm·claude code
思绪无限12 天前
使用Conda创建Python环境并在PyCharm中配置运行项目
python·pycharm·conda·安装教程·python环境配置·环境配置教程
前端小旋风12 天前
pycharm 2025 专业版下载安装教程【附安装包】
python·pycharm
喵~来学编程啦12 天前
【一篇搞定配置】一篇带你从配置到使用(PyCharm远程)完成服务器运行项目(配置、使用一条龙)【全网最详细版】
服务器·python·pycharm