STINNER Victor <victor.stin...@haypocalc.com> added the comment: > What do you gain with this patch? (i.e. what is its advantage?)
You know directly that os.listdir(bytes) is unable to encode the filename, instead of manipulate an invalid filename (b'?') and get the error later (when you use the filename: open, copy, delete, ... the file). It's the same idea than str+bytes raises an error on Python3: get the error earlier instead of store invalid data and get the error to late. Anywy, on Windows, it's not a good idea to manipulate bytes filenames. So it's also a way to encourage people to migrate their applications to unicode on Windows. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9820> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com