You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When writing certain Python code, auto-indent/de-indent fails to properly indent/de-indent lines as expected. For example, if I write:
if myVar == 1:
print("This is equal to 1")
else:
print ("This is not equal to 1")
The editor fails to automatically indent the "else" statement. it should be able to detect that I am entering an "else" statement and properly handle indentation and de-indentation. The same issue occurs on try/except blocks.
try:
subprocess.check_output("someprogram.exe")
except CalledProcessException:
print("The process failed.")
The editor should be able to detect when it sees the except block starter and properly de--indent the code as expected. As it stands, both the if/else and try/except blocks look like this when entered into the editor:
if myvar == 1:
print("This is equal to 1")
else:
print("This is not equal to 1")
I think #2272 addresses the bigger problem that's causing indentation issues across all languages. Solving that should automatically take care of such issues. I could be wrong though.
Activity
sumit0190 commentedon Sep 13, 2016
I think #2272 addresses the bigger problem that's causing indentation issues across all languages. Solving that should automatically take care of such issues. I could be wrong though.
bpasero commentedon Sep 13, 2016
This should be reported to the Python repository first.