Message78582
> 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 ;-) |
|
Date |
User |
Action |
Args |
2008-12-31 00:29:39 | vstinner | set | recipients:
+ vstinner, loewis, baikie, dedded |
2008-12-31 00:29:39 | vstinner | set | messageid: <1230683379.06.0.578366757243.issue3023@psf.upfronthosting.co.za> |
2008-12-31 00:29:38 | vstinner | link | issue3023 messages |
2008-12-31 00:29:37 | vstinner | create | |
|