On Jul 31, 2011 8:57 PM, "Christopher King" <g.nius.ck@gmail.com> wrote:
> What would happen is if you do something like.
>
> match=re.search('^(?PP<tag>[a-z])*$', 'abc')
> Then the match.groupdict() would return
> {'tag.0':'a', 'tag.1':'b', 'tag.2':'c', 'tag.-1':'c', 'tag.-2':'b', 'tag.-3':'a'}
> notice the PP. This means that it will save all the times it matches.

If you want to return something that supports negative indexing, why not return a list instead of an ad-hoc string representation?