On 12/6/06, Alastair Houghton <[EMAIL PROTECTED]> wrote: [from previous message]: >> Anyway, clearly what people will expect here (talking about the match >> object API) is that m[3:4] would give them a list (or some equivalent >> sequence object) containing groups 3 and 4. Why do you think someone >> would expect a match object?
> It's much more likely to be confusing to people that they have to write > > list(m)[x:y] > or > [m[i] for i in xrange(x,y)] > when m[x] and m[y] work just fine. <> > Look, I give in. There's no point trying to convince any of you > further, and I don't have the time or energy to press the point. > Implement it as you will. If necessary it can be an extension of my > "re" replacement that slicing is supported on match objects. Keep in mind when implementing that m[3:4] should contain only the element at index 3, not both 3 and 4, as you've seemed to imply twice. cheers, -Mike _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com