Dec. 8, 2006
10:41 a.m.
Fredrik Lundh wrote:
Talin wrote:
The original proposal was to make m[n] a synonym for m.group(n). "group()" is clearly map-like in its behavior.
so have you checked what exception m.group(n) raises when you try to access a group that doesn't exist ?
The KeyError vs IndexError distinction is unreliable enough that I'll typically just catch LookupError if I don't know exactly what type I'm dealing with. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia --------------------------------------------------------------- http://www.boredomandlaziness.org