Message326911
re.finditer appears to fail to match within the first 7 characters in a string when re.MULTILINE is used:
>>> REGEX = re.compile("y")
>>> [list(m.start() for m in REGEX.finditer("{}y".format("x"*i), re.MULTILINE)) for i in range(10)]
[[], [], [], [], [], [], [], [], [8], [9]]
Without re.MULTILINE, this works fine:
>>> [list(m.start() for m in REGEX.finditer("{}y".format("x"*i))) for i in range(10)]
[[0], [1], [2], [3], [4], [5], [6], [7], [8], [9]]
Passing re.MULTILINE to re.compile doesn't seem to have any effect. |
|
Date |
User |
Action |
Args |
2018-10-02 21:29:14 | tdawes | set | recipients:
+ tdawes, ezio.melotti, mrabarnett |
2018-10-02 21:29:14 | tdawes | set | messageid: <1538515754.54.0.545547206417.issue34873@psf.upfronthosting.co.za> |
2018-10-02 21:29:14 | tdawes | link | issue34873 messages |
2018-10-02 21:29:14 | tdawes | create | |
|