|
From: Robert K. <rob...@gm...> - 2006-11-01 04:48:17
|
hu...@ya... wrote:
> I tried:
>
> label='$\textrm{test}_2$
> xlabel(r label)
> xlabel(r+label)
>
> etc but it not working (like I expected). So I would like to know if there are
> a way to precise that the text is a raw string by another thing that the r
> character just before the string. Perhaps that will be good to have an option
> like raw=true or something similar?
There is no such thing as a raw string *object*. There are only raw string
*literals*. The r'' determines how the source code is parsed, not how the
contents of the object is treated.
label = r'$\textrm{test}_2$'
xlabel(label)
After the source code containing the string literal is parsed, the string is
simply a string.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
|