[Python-checkins] python/dist/src/Lib tokenize.py,1.37,1.38
rhettinger@users.sourceforge.net
rhettinger at users.sourceforge.net
Tue Jun 21 09:44:15 CEST 2005
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25473/Lib
Modified Files:
tokenize.py
Log Message:
SF bug #1224621: tokenize module does not detect inconsistent dedents
Index: tokenize.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/tokenize.py,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- tokenize.py 10 Jun 2005 11:05:18 -0000 1.37
+++ tokenize.py 21 Jun 2005 07:43:57 -0000 1.38
@@ -271,6 +271,9 @@
indents.append(column)
yield (INDENT, line[:pos], (lnum, 0), (lnum, pos), line)
while column < indents[-1]:
+ if column not in indents:
+ raise IndentationError(
+ "unindent does not match any outer indentation level")
indents = indents[:-1]
yield (DEDENT, '', (lnum, pos), (lnum, pos), line)
More information about the Python-checkins
mailing list