[Python-checkins] CVS: python/dist/src/Lib sre.py,1.19,1.20
Fredrik Lundh
python-dev@python.org
Sun, 2 Jul 2000 16:00:00 -0700
- Previous message: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.21,2.22 sre.h,2.11,2.12
- Next message: [Python-checkins] CVS: python/dist/src/PC/example_nt example.dsp,1.2,1.3 example.dsw,1.1,1.2 readme.txt,1.6,1.7 example.mak,1.3,NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Lib
In directory slayer.i.sourceforge.net:/tmp/cvs-serv15713/Lib
Modified Files:
sre.py
Log Message:
- changed sre.Scanner to use lastindex instead of index.
Index: sre.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/sre.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** sre.py 2000/07/02 17:33:27 1.19
--- sre.py 2000/07/02 22:59:57 1.20
***************
*** 166,170 ****
for phrase, action in lexicon:
p.append("(?:%s)(?P#%d)" % (phrase, len(p)))
! self.scanner = sre.compile("|".join(p))
def scan(self, string):
result = []
--- 166,170 ----
for phrase, action in lexicon:
p.append("(?:%s)(?P#%d)" % (phrase, len(p)))
! self.scanner = _compile("|".join(p))
def scan(self, string):
result = []
***************
*** 179,183 ****
if i == j:
break
! action = self.lexicon[m.index][1]
if callable(action):
self.match = match
--- 179,183 ----
if i == j:
break
! action = self.lexicon[m.lastindex][1]
if callable(action):
self.match = match
- Previous message: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.21,2.22 sre.h,2.11,2.12
- Next message: [Python-checkins] CVS: python/dist/src/PC/example_nt example.dsp,1.2,1.3 example.dsw,1.1,1.2 readme.txt,1.6,1.7 example.mak,1.3,NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]