[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-bugs-list
Subject:    [issue34294] re.finditer and lookahead bug
From:       Karthikeyan Singaravelan <report () bugs ! python ! org>
Date:       2018-07-31 16:42:45
Message-ID: 1533055365.42.0.56676864532.issue34294 () psf ! upfronthosting ! co ! za
[Download RAW message or body]


Karthikeyan Singaravelan <tir.karthi@gmail.com> added the comment:

➜  cpython git:(70d56fb525) ✗ ./python.exe
Python 3.7.0a2+ (tags/v3.7.0a2-341-g70d56fb525:70d56fb525, Jul 31 2018, 21:58:10)
[Clang 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
> > > 
➜  cpython git:(70d56fb525) ✗ ./python.exe -c 'import re; print([m.groupdict() \
for m in re.finditer(r"(?=<(?P<tag>\w+)/?>(?:(?P<text>.+?)</(?P=tag)>)?)", \
"<test><foo2/></test>")])' [{'tag': 'test', 'text': '<foo2/>'}, {'tag': 'foo2', \
'text': '<foo2/>'}]


➜  cpython git:(e69fbb6a56) ✗ ./python.exe
Python 3.7.0a2+ (tags/v3.7.0a2-340-ge69fbb6a56:e69fbb6a56, Jul 31 2018, 22:12:06)
[Clang 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
> > > 
➜  cpython git:(e69fbb6a56) ✗ ./python.exe -c 'import re; print([m.groupdict() \
for m in re.finditer(r"(?=<(?P<tag>\w+)/?>(?:(?P<text>.+?)</(?P=tag)>)?)", \
"<test><foo2/></test>")])' [{'tag': 'test', 'text': '<foo2/>'}, {'tag': 'foo2', \
'text': None}]

Does this have something to do with \
70d56fb52582d9d3f7c00860d6e90570c6259371(bpo-25054, bpo-1647489) ?


Thanks

----------

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue34294>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/python-bugs-list%40marc.info



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic