Message355982
I've got a bit confused and am doubting myself - is the below output expected?
>>> m = re.match('(?:()|(?(1)()|z)){1,2}(?(2)a|z)', 'a')
>>> m.groups()
('', '')
>>> m = re.match('(?:()|(?(1)()|z)){1,2}(?(1)a|z)', 'a')
>>> m.groups()
('', None)
The first pattern doesn't behave as I would (probably naively expect) given Matthew's explanation of this bug - wouldn't the bug cause the match to fail with {1,2} as well?
Also, it seems odd that changing the condition in the if clause should change what gets captured.
Anyone have any thoughts? |
|
Date |
User |
Action |
Args |
2019-11-04 22:02:29 | jacksonriley | set | recipients:
+ jacksonriley, ezio.melotti, mrabarnett, abacabadabacaba, serhiy.storchaka, malin, LewisGaul |
2019-11-04 22:02:29 | jacksonriley | set | messageid: <1572904949.22.0.183185261375.issue23692@roundup.psfhosted.org> |
2019-11-04 22:02:29 | jacksonriley | link | issue23692 messages |
2019-11-04 22:02:29 | jacksonriley | create | |
|