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 FFY00
Recipients FFY00, brett.cannon, docs@python, jaraco
Date 2021-05-23.16:04:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1621785867.31.0.368999017148.issue44196@roundup.psfhosted.org>
In-reply-to
Content
Okay.

Having a better look at it, I think we should only add this specification to open().

Traversable, by design, makes it totally plausible that open() cannot be performed. It could be a nonexistent path, the Traversable could represent object where open() does not make sense given the underlying implementation (it's something that cannot be read), etc.

If Traversable makes it possible for open() to not work, it should give us a mechanism to handle such situations.
If the only thing I know about an object is that it implements Traversable, how can I use open() in a reliable manner without having my code explode?

This mechanism does not need to be FileNotFoundError. But, in my opinion, it is what probably makes the most sense in this case. Please let me know if you have a different/better idea.
History
Date User Action Args
2021-05-23 16:04:27FFY00setrecipients: + FFY00, brett.cannon, jaraco, docs@python
2021-05-23 16:04:27FFY00setmessageid: <1621785867.31.0.368999017148.issue44196@roundup.psfhosted.org>
2021-05-23 16:04:27FFY00linkissue44196 messages
2021-05-23 16:04:27FFY00create