Aldwin Pollefeyt <aldwinald...@gmail.com> added the comment:
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 ---------- nosy: +aldwinaldwin _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37436> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com