Bug? exec converts '\n' to newline in docstrings!?
Stargaming
stargaming at gmail.com
Mon Jul 30 13:34:45 EDT 2007
On Mon, 30 Jul 2007 11:00:14 -0500, Edward K Ream wrote:
>> The problem is because you are trying to represent a Python
> program as a Python string literal, and doing it incorrectly.
>
> Yes, that is exactly the problem. Thanks to all who replied. Changing
> changing '\n' to '\\n' fixed the problem.
Raw strings (r'this \n will stay') might help, too. See http://
docs.python.org/ref/strings.html#l2h-14
More information about the Python-list
mailing list