This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients baikie, dedded, loewis, vstinner
Date 2008-12-31.00:29:37
SpamBayes Score 2.51895e-06
Marked as misclassified No
Message-id <>
> Hmm, yes, I see that the open() builtin doesn't accept bytes
> filenames, though still does.

What? open() builtin, and accept bytes filename.

> So what *is* os.listdir() supposed to do when it finds an
> unconvertible filename?  Raise an exception?

os.listdir(str)->str raises an exception on undecodable filename, 
whereas os.listdir(bytes)->bytes doesn't write unicode error because 
the filename is not decoded!

> What if someone puts unconvertible strings in the password database?

Which database? It sounds like a different issue. It's always a good 
thing to reject undecodable string, even with python2 ;-)
Date User Action Args
2008-12-31 00:29:39vstinnersetrecipients: + vstinner, loewis, baikie, dedded
2008-12-31 00:29:39vstinnersetmessageid: <>
2008-12-31 00:29:38vstinnerlinkissue3023 messages
2008-12-31 00:29:37vstinnercreate