[Python-checkins] python/dist/src/Misc NEWS,1.511,1.512
niemeyer@users.sourceforge.net
niemeyer@users.sourceforge.net
Wed, 06 Nov 2002 06:06:55 -0800
Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv9767/Misc
Modified Files:
NEWS
Log Message:
Fixed bug #470582, using a modified version of patch #527371,
from Greg Chapman.
* Modules/_sre.c
(lastmark_restore): New function, implementing algorithm to restore
a state to a given lastmark. In addition to the similar algorithm used
in a few places of SRE_MATCH, restore lastindex when restoring lastmark.
(SRE_MATCH): Replace lastmark inline restoring by lastmark_restore(),
function. Also include it where missing. In SRE_OP_MARK, set lastindex
only if i > lastmark.
* Lib/test/re_tests.py
* Lib/test/test_sre.py
Included regression tests for the fixed bugs.
* Misc/NEWS
Mention fixes.
Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.511
retrieving revision 1.512
diff -C2 -d -r1.511 -r1.512
*** NEWS 5 Nov 2002 22:41:33 -0000 1.511
--- NEWS 6 Nov 2002 14:06:53 -0000 1.512
***************
*** 353,356 ****
--- 353,363 ----
interpreter was compiled.
+ - Fixed bug #470582: sre module would return a tuple (None, 'a', 'ab')
+ when applying the regular expression '^((a)c)?(ab)$' on 'ab'. It now
+ returns (None, None, 'ab'), as expected. Also fixed handling of
+ lastindex/lastgroup match attributes in a similar cases. For example,
+ when running the expression r'(a)(b)?b' over 'ab', lastindex must be
+ 1, not 2.
+
Library
-------