unexpected auto-indenting when varibles names that start with 'pass' #142

Closed
davidgardner opened this Issue Aug 12, 2010 · 1 comment

Comments

Projects
None yet
3 participants
@davidgardner

using 0.1, on Debian unstable with Python 2.6.5
Minor issue after the second line the auto-indent jumps back to the first column,
then I manually enter four spaces enter the if statement, then it auto-indents four spaces
after entering the if statement, so I enter in four more and I get an IndentationError:

In [3]: for i in range(10):
...: pass_arg=i
...: if i==pass_arg:

...: print(i)

IndentationError: expected an indented block (, line 4)

In [4]: % hist -n

for i in range(10):
pass_arg=i
if i==pass_arg:
print(i)
_ip.magic("hist -n")

In [5]:

@takluyver

This comment has been minimized.

Show comment Hide comment
@takluyver

takluyver Mar 23, 2011

Owner

In inputsplitter, "pass" is recognised as dedenting the next line. We just need to refine the regex so it doesn't match anything starting with pass (or return or raise).

Owner

takluyver commented Mar 23, 2011

In inputsplitter, "pass" is recognised as dedenting the next line. We just need to refine the regex so it doesn't match anything starting with pass (or return or raise).

@fperez fperez closed this in 2b92905 Apr 10, 2011

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment