Message346801
Integers seems to be accepted, so not a TypeError? Maybe documentation needs some more information.
Documentation os.path under os.path.exists(path):
Changed in version 3.3: path can now be an integer: True is returned if it is an open file descriptor, False otherwise.
in posixmodule.c:
* path_converter also optionally accepts signed
* integers (representing open file descriptors) instead
* of path strings.
although i dunno how to use then:
$ echo "test" > 123
$ ls -i 123
8012691 123
$ ./python -c "import os.path; print(os.path.isfile(8012691))"
False
$ ./python -c "import os.path; print(os.path.isfile('123'))"
True |
|
Date |
User |
Action |
Args |
2019-06-28 05:13:58 | aldwinaldwin | set | recipients:
+ aldwinaldwin, paul.moore, tim.golden, zach.ware, steve.dower, zufuliu |
2019-06-28 05:13:58 | aldwinaldwin | set | messageid: <1561698838.51.0.403510489391.issue37436@roundup.psfhosted.org> |
2019-06-28 05:13:58 | aldwinaldwin | link | issue37436 messages |
2019-06-28 05:13:58 | aldwinaldwin | create | |
|