[Python-Dev] [NPERS] Re: a feature i'd like to see in python #2: indexing of match objects (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Tue Dec 5 01:15:58 CET 2006
- Previous message: [Python-Dev] [NPERS] Re: a feature i'd like to see in python #2: indexing of match objects
- Next message: [Python-Dev] a feature i'd like to see in python #2: indexing of match objects
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Nick Coghlan wrote:
*The inconsistency being that group() considers the whole match to be group 0, while groups() does not.
The real inconsistency seems to be that the groups are being treated as an array when they're really a tree. Maybe a different API altogether would be better, e.g.
m.range --> the whole match
m.subgroups[i] --> another match object with its own range and subgroups attributes
-- Greg
- Previous message: [Python-Dev] [NPERS] Re: a feature i'd like to see in python #2: indexing of match objects
- Next message: [Python-Dev] a feature i'd like to see in python #2: indexing of match objects
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]