Dec. 7, 2006
6:21 p.m.
Fredrik Lundh wrote:
Michael Urman wrote:
The idea that slicing a match object should produce a match object sounds like a foolish consistency to me.
well, the idea that adding m[x] as a convenience alias for m.group(x) automatically turns m into a list-style sequence that also has to support full slicing sounds like an utterly foolish consistency to me.
Maybe instead of considering a match object to be a sequence, a match object should be considered a map? After all, we do have named, as well as numbered, groups...? -- Talin