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 aldwinaldwin
Recipients aldwinaldwin, paul.moore, steve.dower, tim.golden, zach.ware, zufuliu
Date 2019-06-28.05:13:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1561698838.51.0.403510489391.issue37436@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2019-06-28 05:13:58aldwinaldwinsetrecipients: + aldwinaldwin, paul.moore, tim.golden, zach.ware, steve.dower, zufuliu
2019-06-28 05:13:58aldwinaldwinsetmessageid: <1561698838.51.0.403510489391.issue37436@roundup.psfhosted.org>
2019-06-28 05:13:58aldwinaldwinlinkissue37436 messages
2019-06-28 05:13:58aldwinaldwincreate