It's a bug. Thanks reporting.
https://bugs.launchpad.net/python-mode/+bug/1191133
This is fixed in trunk now. See revision 1266 at
https://launchpad.net/python-mode
Should also appear also at
https://github.com/emacsmirror/python-mode
Andreas
Question
I've searched all about, and all I could find was this similar isssue: improper exiting from indentation in emacs python-mode where someone is unable to exit from the proper indentation.
Whenever I create an if statement, say
if(foo):
bar()
Python-mode refuses to allow me to indent the bar line, forcing me to leave it as
if(foo):
bar()
Which will throw an indentation error. This happens in all .py files. It works fine while using python.el, but I much prefer the features of python-mode. Has anyone else found a solution / run into this?
My .emacs file is only the lines for loading python-mode.
Solution
It's a bug. Thanks reporting.
https://bugs.launchpad.net/python-mode/+bug/1191133
This is fixed in trunk now. See revision 1266 at
https://launchpad.net/python-mode
Should also appear also at
https://github.com/emacsmirror/python-mode
Andreas
OTHER TIPS
Otherwise, As I commented before, if the issue still couldn't be resolved I think you'd better download the latest python-mode from ELPA, which should run M-x package-list-packages and then put below statement to your .emacs file.I am using python-mode-6.0.10 and it works well.
(require 'python-mode)