Re: a little parsing challenge ☺

Raymond Hettinger python at rcn.com
Sun Jul 17 15:16:13 EDT 2011


On Jul 17, 8:49 am, Thomas Boell <tbo... at domain.invalid> wrote:
> But why do you enumerate with start=1? Shouldn't you start with index 0?

The problem specification says that the the char number should match
the emacs goto-char function which is indexed from one, not from
zero.  This is testable by taking the output of the program and
running it through emacs to see that the cursor gets moved exactly to
the location of the mismatched delimiter.


Raymond




More information about the Python-list mailing list