Non-indenting colon
Bug #1207405 reported by
Barry Warsaw
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-mode.el |
Fix Released
|
Medium
|
Andreas Roehler |
Bug Description
def foo(bar):
for i in range(10):
print(i)
tied = bar[
Put point on the last line, after the open bracket. Hit colon (as if you were going to type bar[:]). The line gets incorrectly indented to under the `print`.
There may be other situations where colons should not re-indent the line.
Changed in python-mode: | |
assignee: | nobody → Andreas Roehler (a-roehler) |
milestone: | none → 6.1.2 |
importance: | Undecided → Medium |
Changed in python-mode: | |
status: | In Progress → Fix Committed |
Changed in python-mode: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Hmm, AFAIU `print' does not close the `for'-loop, so such assignment seems possible at that place(?) Electric-colon always will choose the rightmost thinkable.
Will provide a menu toggling `py-electric- colon-active- p' in any case.
Andreas