Feature request #7640

Make AutoIndentation possible in python console

Added by vinayan Parameswaran about 11 years ago. Updated almost 7 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Python plugins
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:16561

Description

It would be great to have auto indentation after ':' signs.

For example, the below snippet would fail.

lst = ['a','b','c','d']
for i in lst:
print i
  File "<input>", line 2
    print i
        ^
IndentationError: expected an indented block

To make it work, we need to add required spaces to indent the lines after the ':' sign

lst = ['a','b','c','d']
for i in lst:
    print i
a
b
c
d

History

#1 Updated by Jürgen Fischer almost 10 years ago

  • Target version changed from Version 2.0.0 to Future Release - Lower Priority

#2 Updated by Giovanni Manghi almost 7 years ago

  • Easy fix? set to No

Also available in: Atom PDF