# 智能键设置：Python

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/zh-cn/help/clion/llms.txt).

> **TL;DR**
> `文件 | 设置 | 编辑器 | 常规 | 智能键 | Python`  适用于 Windows 和 Linux
>
>
>
> `%instance% | 设置 | 编辑器 | 常规 | 智能键 | Python`  适用于 macOS
>
>
>
> `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `⌘ Comma` (Xcode), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (ReSharper), `⌘ Comma` (ReSharper (macOS)), `Ctrl+Alt+S` (QtCreator), `⌘ Comma` (QtCreator (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) !["设置"图标](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.settings.svg)

使用此设置页面配置 Python 中的输入辅助功能。

|  项  |  描述  |
| --- | --- |
|  智能缩进粘贴的行  |  默认情况下，选中此选项时，CLion 会在插入代码片段时遵循 PEP 8 缩进规则。   ![智能缩进粘贴的行](https://resources.jetbrains.com/help/img/idea/2026.3/py_smart_key_indent.png)  |
|  使用括号而不是反斜杠来换行  |  选择此选项（默认情况下），CLion 会将当前表达式括在括号中，以保持语句的完整性，当您按下 `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `⏎` (Xcode), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (ReSharper), `⏎` (ReSharper (macOS)), `Enter` (QtCreator), `⏎` (QtCreator (macOS)), `Enter` (NetBeans), `Enter` (Eclipse), `⏎` (Eclipse (macOS)) 并拆分它时。   ![在语句中按 Enter 键时用括号包装表达式](https://resources.jetbrains.com/help/img/idea/2026.3/py_smart_key_wrap.png)  |
|  定义方法时插入 'self'  |  选中此选项（默认情况下），CLion 会在方法声明中添加  `self` 。   ![定义方法时插入 'self'](https://resources.jetbrains.com/help/img/idea/2026.3/py_smart_key_self.png)  |
|  在文档注释存根中插入类型占位符。  |  选择此选项，CLion 会在文档注释中创建一个输入类型的占位符。 所有文档字符串格式都添加了占位符，但   普通   除外。   ![在文档注释存根中插入类型占位符](https://resources.jetbrains.com/help/img/idea/2026.3/py_smart_key_docstring.png)  |

