Help, Search and Substitute

andy47 at andy47 at
Mon Nov 6 05:39:35 CET 2000

In article <8tu1eg0149s at>,
  "Alex Martelli" <aleaxit at> wrote:
> <andy47 at> wrote in message news:8ttai1$c53
$1 at
>     [snip]
> > > def symbol_replace(match, get=symbol_map.get):
> > >     return get(, "")
>     [snip]
> > > print symbol_pattern.sub(symbol_replace, "{foo}fie{bar}")
>     [snip]
[ snipping very understandable explanation ]

Alex, many thanks. That was exactly what I was looking for. Not too
used to passing around functions as arguments myself but I am now a
wiser person.

Sent via
Before you buy.

More information about the Python-list mailing list