[Python-Dev] a feature i'd like to see in python #2: indexing of match objects

Ben Wing ben at 666.com
Sun Dec 3 13:24:31 CET 2006

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.


More information about the Python-Dev mailing list