New submission from dubiousjim <dubious...@gmail.com>:
`Lib/os.py` has at line 464, in definition of `fwalk`: ``` if not isinstance(top, int) or not hasattr(top, '__index__'): ``` If I understand this test correctly, it should be requiring that the name/fd is NEITHER an int NOR has an __index__ method. As written, anything which fails the left-hand side (and so is an int) will probably have an __index__ method, so the right-hand side is idle. Proposed fix: change `or` to `and`. ---------- components: Library (Lib) messages: 378725 nosy: dubiousjim priority: normal severity: normal status: open title: fwalk: incorrect boolean test for non-fd arguments type: behavior versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42053> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com