Ned Deily added the comment:

If you do not want the `\n` to be interpreted as a linefeed, you need to use a 
raw string literal, like:

a = r'''
...     'my_key' : r'my value which contains \n character'
... '''
>>> print(dedent(a))

'my_key' : r'my value which contains \n character'

----------
nosy: +ned.deily
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23497>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to