bpo-38994: Implement __class_getitem__ for PathLike (GH-17498)

https://bugs.python.org/issue38994
This commit is contained in:
Batuhan Taşkaya 2019-12-08 23:31:15 +03:00 committed by Miss Islington (bot)
parent cd90a52983
commit 526606baf7
5 changed files with 13 additions and 0 deletions

View file

@ -777,6 +777,9 @@ class PurePath(object):
return NotImplemented
return self._cparts >= other._cparts
def __class_getitem__(cls, type):
return cls
drive = property(attrgetter('_drv'),
doc="""The drive prefix (letter or UNC path), if any.""")