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 serhiy.storchaka
Recipients ezio.melotti, mrabarnett, selik, serhiy.storchaka, xiang.zhang
Date 2017-04-03.09:49:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1491212985.21.0.161233885098.issue29965@psf.upfronthosting.co.za>
In-reply-to
Content
This has already been discussed in other issues. Adding support of indexing opened a can of worms.

len() for match objects is ambiguous because of the group 0. Implementing len() will make the match object iterable, but in a way incompatible with issue9529 (because of the group 0).

As for slicing and negative indexes, what is the use case? Do you know that you can get a tuple of groups by passing several arguments to group()? A regular expression usually has known set of groups, so you can just enumerate the indices (or better names) of needed groups (they can be not sequential).
History
Date User Action Args
2017-04-03 09:49:45serhiy.storchakasetrecipients: + serhiy.storchaka, ezio.melotti, mrabarnett, xiang.zhang, selik
2017-04-03 09:49:45serhiy.storchakasetmessageid: <1491212985.21.0.161233885098.issue29965@psf.upfronthosting.co.za>
2017-04-03 09:49:45serhiy.storchakalinkissue29965 messages
2017-04-03 09:49:44serhiy.storchakacreate