New submission from Alok Singh <alokbeni...@gmail.com>: I was thinking today that it would be natural for paths to support __contains__ since then you could write statements like `if file in dir` or `if subdir in dir` cleanly.
The library plumbum appears to already have this, but I think it could be useful in the standard library: https://plumbum.readthedocs.io/en/latest/_modules/plumbum/path/base.html#Path.__contains__ ---------- components: Library (Lib) messages: 315422 nosy: Alok Singh priority: normal severity: normal status: open title: Add __contains__ to pathlib type: enhancement versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33301> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com