List of Python postfix completion templates
For more information about postfix templates, see Postfix code completion.
This table summarizes the postfix completion templates that you can use with your Python code.
Name | Description | Example. Before | Example. After |
---|---|---|---|
| Iterates over the enumeration of the expression as source in the for statement. |
|
|
| Iterates over the expression as source in the for statement. |
|
|
| Iterates over the enumeration of the expression as source in the for statement. |
|
|
| Uses the expression as a condition in the if statement. |
|
|
| Checks if the expression is None. |
|
|
| Checks if the expression is not None. |
|
|
| Iterates over the expression as source in the for statement. |
|
|
| Iterates over the enumeration of the expression as source in the for statement. |
|
|
| Converts postfix .len calls to len calls. |
|
|
| Surrounds the current statement with the if __name__ == '__main__:' expression. |
|
|
| Negate the expression. |
|
|
| Encloses the selected expression in parentheses. |
|
|
| Surrounds the expression with the print function for Python 3 or with the print statement for Python 2. |
|
|
| Returns a value of the containing method. |
|
|
| Uses the expression as condition in the while statement. |
|
|