Regular expression question
jepler at unpythonic.net
jepler at unpythonic.net
Sun Nov 24 12:31:55 EST 2002
On Sun, Nov 24, 2002 at 11:32:44AM -0500, walt wrote:
> Sorry, hit the wrong key.
>
> One small correction to this section:
>
> fname = s.group(1).lower()
> try:
> f = function_map[fname] # was [s], s is match object.
> except KeyError:
Thanks. I screwed this up when I decided it was better to not write
try:
f = function_map[s.group(1).lower()]
...
but I didn't actually fix the code right.
Jeff
More information about the Python-list
mailing list