Message142543
Even if this bug is fixed, it still won't work as you expect, and this s why.
The Scanner function accepts a list of 2-tuples. The first item of the tuple is a regex and the second is a function. For example:
re.Scanner([(r"\d+", number), (r"\w+", word)])
The Scanner function then builds a regex, using the given regexes as alternatives, each wrapped as a capture group:
r"(\d+)|(\w+)"
When matching, it sees which group captured and uses that to decide which function it should call, so, for example, if group 1 matched, it calls "number", and if group 2 matched, it calls "word".
When you introduce capture groups into the regexes, it gets confused. If your regex matches, it'll see that groups 1 and 2 match, so it'll try to call the second function, but there's isn't one... |
|
Date |
User |
Action |
Args |
2011-08-20 16:57:59 | mrabarnett | set | recipients:
+ mrabarnett, ezio.melotti, angelonuffer |
2011-08-20 16:57:59 | mrabarnett | set | messageid: <1313859479.12.0.574131586204.issue12789@psf.upfronthosting.co.za> |
2011-08-20 16:57:58 | mrabarnett | link | issue12789 messages |
2011-08-20 16:57:58 | mrabarnett | create | |
|