Raw Unicode docstring
python at mrabarnett.plus.com
Tue Nov 16 23:22:40 CET 2010
On 16/11/2010 21:56, Boštjan Mejak wrote:
> how does one write a raw unicode docstring? If I have backslashes in
> the docstring, I must tuck an 'r' in front of it, like this:
> r"""This is a raw docstring."""
> If I have foreign letters in the docstring, I must tuck a 'u' in front
> of it, like this:
> u"""This is a Unicode docstring."""
> What if I have foreign characters *and* backslashes in my docstring?
> How to write the docstring then?
> ru"""My raw unicode docstring."""
> ur"""My unicode docstring."""
> Please answer my question, although it may sound like a noobish one. Thanks.
Why not try them both and see what happens?
More information about the Python-list