[Python-bugs-list] [ python-Bugs-672491 ] 2.3a1 computes lastindex incorrectly

SourceForge.net noreply@sourceforge.net
Wed, 22 Jan 2003 07:28:53 -0800


Bugs item #672491, was opened at 2003-01-22 16:28
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=672491&group_id=5470

Category: Regular Expressions
Group: Python 2.3
Status: Open
Resolution: None
Priority: 6
Submitted By: Martin v. Löwis (loewis)
Assigned to: Fredrik Lundh (effbot)
Summary: 2.3a1 computes lastindex incorrectly

Initial Comment:
In Python 2.[012], the code

import re
exp = re.compile("(?P<NCName>[a-zA-Z_](\w|[_.-])*)")
print exp.match("namespace").lastgroup

prints "NCName". In Python 2.3a1, it prints "None". The
problem is that last index is 2, instead of 1, as it
should be.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=672491&group_id=5470