Ezio Melotti <ezio.melo...@gmail.com> added the comment:

The attached patch seems to do the trick (not sure if it's the best way to fix 
the issue though):
>>> open('woo\raa')
<open file 'woo\raa', mode 'r' at 0xb77c2aa8>
>>> open('woo\ra\'a', 'w')
<open file "woo\ra'a", mode 'w' at 0xb77c2b88>
>>> open('woo\ra\'a"', 'w')
<open file 'woo\ra\'a"', mode 'w' at 0xb77c2b18>
>>> 

It's more or less equivalent to:
- return "<open file '%s', mode '%s' at %p>" % (fname, mode, addr)
+ return "<open file %s, mode '%s' at %p>" % (repr(fname), mode, addr)

----------
keywords: +patch
stage: needs patch -> test needed
Added file: http://bugs.python.org/file24694/issue14161.diff

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

Reply via email to