PyCharm Edu 4.0 Help

Completing Statements

On this page:

Completing statements

The Smart Enter completion enables you to create syntactically correct code constructs.

To automatically complete a statement, follow these steps:

  • Start typing a statement, and press N/A.

    The punctuation required in the current context is added and the caret moves to the next editing position.

Examples

Completing a method declaration

Start typing a method declaration, and press N/A after the opening parenthesis:

py completing code construct 1

This will create the entire construct of a method, the caret resting inside the method body:

py completing code construct 2

Completing code constructs

Start typing a code construct:

py completing code construct 3

After pressing N/A, the construct is completed, and the caret is placed at the next editing position:

py completing code construct 4
Last modified: 15 December 2017