[Python-checkins] python/dist/src/Lib sre_parse.py,1.63,1.63.2.1
birkenfeld@users.sourceforge.net
birkenfeld at users.sourceforge.net
Sun Sep 18 15:03:20 CEST 2005
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv719/Lib
Modified Files:
Tag: release24-maint
sre_parse.py
Log Message:
Bug #1202493: Fixing SRE parser to handle '{}' as perl does, rather than
considering it exactly like a '*'.
Backport from 2.5 branch.
Index: sre_parse.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v
retrieving revision 1.63
retrieving revision 1.63.2.1
diff -u -d -r1.63 -r1.63.2.1
--- sre_parse.py 3 Sep 2004 20:15:56 -0000 1.63
+++ sre_parse.py 18 Sep 2005 13:03:16 -0000 1.63.2.1
@@ -474,6 +474,9 @@
elif this == "+":
min, max = 1, MAXREPEAT
elif this == "{":
+ if source.next == "}":
+ subpatternappend((LITERAL, ord(this)))
+ continue
here = source.tell()
min, max = 0, MAXREPEAT
lo = hi = ""
More information about the Python-checkins
mailing list