1

In my case, I got the error upon entering the first line into an ipython buffer. This appears to be a known bug in python-mode 6.0.4.

Johnny Brown
  • 1,000
  • 11
  • 18

2 Answers2

1

My solution was to edit lines 1565-1566 of python-mode.el like so.

(let ((lastindent (if
                         (py-beginning-of-statement-p)
                         (current-indentation)
                       (progn
-                   (py-down-statement)
-                   (current-indentation)))))
+                   (py-down-statement)
+                   (current-indentation))))
+     erg)

Also, this is fixed in 6.0.5

Johnny Brown
  • 1,000
  • 11
  • 18
0

this bug should not occur in current trunk resp. latest release

http://launchpad.net/python-mode

Andreas Röhler
  • 4,804
  • 14
  • 18