This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark
Recipients akuchling, amaury.forgeotdarc, jimjjewett, mark, pitrou, rsc, timehorse
Date 2008-05-28.13:38:41
SpamBayes Score 0.421835
Marked as misclassified No
Message-id <>
AFAIK if you have a regex with named capture groups there is no direct
way to relate them to the capture group numbers.
You could do (untested; Python 3 syntax):

    d = {v: k for k, v in match.groupdict()}
    for i in range(match.lastindex):
         print(i,, d[])

One possible solution would be a grouptuples() function that returned a
tuple of 3-tuples (index, name, captured_text) with the name being None
for unnamed groups.

Anyway, good luck with all your improvements, I will be especially glad
if you manage to do (2) and (8) (and maybe (3)).
Date User Action Args
2008-05-28 13:38:49marksetspambayes_score: 0.421835 -> 0.421835
recipients: + mark, akuchling, jimjjewett, amaury.forgeotdarc, pitrou, rsc, timehorse
2008-05-28 13:38:48marksetspambayes_score: 0.421835 -> 0.421835
messageid: <>
2008-05-28 13:38:46marklinkissue2636 messages
2008-05-28 13:38:44markcreate