Éric Araujo <[email protected]> added the comment:
Funny one :D Reproduced on linux:
>>> open('/tmp/t\nest', 'w')
<open file '/tmp/t
est', mode 'w' at 0x7f11268a19c0>
file_repr in Objects/fileobject.c calls
http://docs.python.org/c-api/unicode#PyUnicode_AsUnicodeEscapeString,
equivalent to encode('unicode-escape'), so backslashes should be escaped.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue14161>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com