diff --git a/Lib/pathlib.py b/Lib/pathlib.py index 531a699a40..9abe2aec95 100644 --- a/Lib/pathlib.py +++ b/Lib/pathlib.py @@ -808,6 +808,9 @@ def __ge__(self, other): def __class_getitem__(cls, type): return cls + def __contains__(self, key): + return key in self.__str__() + drive = property(attrgetter('_drv'), doc="""The drive prefix (letter or UNC path), if any.""")