# Smart Keys settings: Python

> **TL;DR**
> `File | Settings | Editor | General | Smart Keys | Python` for Windows and Linux
>
>
>
> `IntelliJ IDEA | Settings | Editor | General | Smart Keys | Python` for 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)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) ![the Settings icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.settings.svg)

Use this settings page to configure typing assistance features in Python.

For more information about Python support in IntelliJ IDEA, see [Python language support](python.html).

| Item | Description |
| --- | --- |
| Smart indent pasted lines |  With this option selected (by default), IntelliJ IDEA respects the PEP 8 indent when you insert a code fragment.   ![Smart indent pasted lines](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_smart_key_indent.png)  |
| Use parentheses instead of backslashes for breaking lines | With this option selected (by default), IntelliJ IDEA wraps the current expression in parentheses to keep the integrity of the statement when you press `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (NetBeans), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (Eclipse), `⏎` (Eclipse (macOS)) and split it.   ![Wrap the expression in parentheses when pressing Enter inside a statement](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_smart_key_wrap.png)  |
| Insert 'self' when defining a method | With this option selected (by default), IntelliJ IDEA adds `self` to the method declaration.   ![Insert 'self' when defining a method](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_smart_key_self.png)  |
| Insert type placeholders in the documentation comment stub. | With this option selected, IntelliJ IDEA creates a placeholder to enter the type in the documentation comments. The placeholder is added for all docstring formats but Plain.    ![Insert type placeholders in the documentation comment stub](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_smart_key_docstring.png)  |

