~cboylan/+junk/foobar

« back to all changes in this revision

Viewing changes to src/boots/lib/lingos/python.py

  • Committer: David Rosenbaum
  • Date: 2010-01-31 07:36:50 UTC
  • Revision ID: davidjrosenbaum@comcast.net-20100131073650-3dkjl9p90mot1wj0
Fixed a bug in the input_complete method of the python lingo that
caused multiline input to work improperly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
        # Consider input complete if the last line did not end with ":", the last two characters
44
44
        # were newlines or it was empty.
45
45
        try:
46
 
            return command[-2] != ':' or command[-2:] == '\n\n'
 
46
            return command[-1] != ':' or command[-1:] == '\n'
47
47
        except IndexError:
48
48
            return True
49
49