Message318432
I don't know of any OS that supports NULs in filenames (not that my knowledge is encyclopedic).
My reason for suggesting we document it is that os.path.exists() returns False for otherwise invalid filenames, where something like open() raises. On Windows:
>>> os.path.exists('c::bar')
False
>>> open('c::bar')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 22] Invalid argument: 'c::bar'
So I do think it's a little surprising that os.path.exists() would raise with a NUL, instead of returning False. But I don't think it's worth changing the behavior, due to potential (though unlikely) breakage. |
|
Date |
User |
Action |
Args |
2018-06-01 16:53:05 | eric.smith | set | recipients:
+ eric.smith, mrabarnett, r.david.murray, pacujo |
2018-06-01 16:53:05 | eric.smith | set | messageid: <1527871985.01.0.81473610881.issue33721@psf.upfronthosting.co.za> |
2018-06-01 16:53:04 | eric.smith | link | issue33721 messages |
2018-06-01 16:53:04 | eric.smith | create | |
|