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 dubiousjim
Recipients dubiousjim
Date 2020-10-16.17:31:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1602869505.61.0.789643368245.issue42053@roundup.psfhosted.org>
In-reply-to
Content
`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`.
History
Date User Action Args
2020-10-16 17:31:45dubiousjimsetrecipients: + dubiousjim
2020-10-16 17:31:45dubiousjimsetmessageid: <1602869505.61.0.789643368245.issue42053@roundup.psfhosted.org>
2020-10-16 17:31:45dubiousjimlinkissue42053 messages
2020-10-16 17:31:45dubiousjimcreate