[Python-Dev] a feature i'd like to see in python #2: indexing of match objects (original) (raw)
Ben Wing ben at 666.com
Sun Dec 3 13:24:31 CET 2006
- Previous message: [Python-Dev] [NPERS] Re: a feature i'd like to see in python #1: betteriteration control
- 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 ]
this one is fairly simple. if `m' is a match object, i'd like to be able to write m[1] instead of m.group(1). (similarly, m[:] should return the same as list(m.groups()).) this would remove some of the verbosity of regexp code, with probably a net gain in readability; certainly no loss.
ben
- Previous message: [Python-Dev] [NPERS] Re: a feature i'd like to see in python #1: betteriteration control
- 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 ]