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 <1230683379.06.0.578366757243.issue3023@psf.upfronthosting.co.za>
In-reply-to
Content
> Hmm, yes, I see that the open() builtin doesn't accept bytes
> filenames, though os.open() still does.

What? open() builtin, io.open() and os.open() 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 ;-)
History
Date User Action Args
2008-12-31 00:29:39vstinnersetrecipients: + vstinner, loewis, baikie, dedded
2008-12-31 00:29:39vstinnersetmessageid: <1230683379.06.0.578366757243.issue3023@psf.upfronthosting.co.za>
2008-12-31 00:29:38vstinnerlinkissue3023 messages
2008-12-31 00:29:37vstinnercreate