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,

相关推荐
MerlinTheMagic6 小时前
PyCharm无法启动jupyter server问题的解决
ide·jupyter·pycharm
Python×CATIA工业智造6 小时前
Python装饰器解包装技术详解:从原理到高级应用
python·pycharm
饼瑶10 小时前
基于AutoDL远端服务器在pycharm复现:具身智能论文pai0
服务器·elasticsearch·pycharm
少林and叔叔10 小时前
基于yolov5.7.0的人工智能算法的下载、开发环境搭建(pycharm)与运行测试
人工智能·pytorch·python·yolo·目标检测·pycharm
动能小子ohhh11 小时前
Langchain从零开始到应用落地案例[AI智能助手]【3】---使用Paddle-OCR识别优化可识别图片进行解析回答
人工智能·python·pycharm·langchain·ocr·paddle·1024程序员节
Serendipity_Carl11 小时前
爬虫数据清洗可视化案例之全球灾害数据
爬虫·python·pycharm·数据可视化·数据清洗
Python×CATIA工业智造1 天前
Pycatia二次开发基础代码解析:组件识别、选择反转与链接创建技术解析
python·pycharm
妮妮喔妮1 天前
pycharm远程提交Git
ide·git·pycharm
被放养的研究生2 天前
PyCharm常用快捷键
pycharm