Grant Edwards wrote:

> When something odd seems to be happening with strings, always
> print `whatever` rather than whatever
>

:-)

Unholy perlism, Batman!

For the benefit of gentle readers who are newish and might not have
seen the ` character in Python code outside a string literal, or for
those who'd forgotten, there is a cure:

| >>> re.sub(r"`(.*?)`", r"repr(\1)", "print `whatever`, `foo`, `bar`")
| 'print repr(whatever), repr(foo), repr(bar)'


:-)

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to