[Python-checkins] r60596 - python/trunk/Lib/re.py
guido.van.rossum
python-checkins at python.org
Tue Feb 5 18:32:15 CET 2008
Author: guido.van.rossum
Date: Tue Feb 5 18:32:15 2008
New Revision: 60596
Modified:
python/trunk/Lib/re.py
Log:
In the experimental 'Scanner' feature, the group count was set wrong.
Modified: python/trunk/Lib/re.py
==============================================================================
--- python/trunk/Lib/re.py (original)
+++ python/trunk/Lib/re.py Tue Feb 5 18:32:15 2008
@@ -300,8 +300,8 @@
p.append(sre_parse.SubPattern(s, [
(SUBPATTERN, (len(p)+1, sre_parse.parse(phrase, flags))),
]))
+ s.groups = len(p)+1
p = sre_parse.SubPattern(s, [(BRANCH, (None, p))])
- s.groups = len(p)
self.scanner = sre_compile.compile(p)
def scan(self, string):
result = []
More information about the Python-checkins
mailing list