From 526606baf76e7a5309bb00f3bfaefa861a2014ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Batuhan=20Ta=C5=9Fkaya?= <47358913+isidentical@users.noreply.github.com> Date: Sun, 8 Dec 2019 23:31:15 +0300 Subject: bpo-38994: Implement __class_getitem__ for PathLike (GH-17498) https://bugs.python.org/issue38994 --- Lib/pathlib.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Lib/pathlib.py') diff --git a/Lib/pathlib.py b/Lib/pathlib.py index d70fde0ea3..f0537cfea1 100644 --- a/Lib/pathlib.py +++ b/Lib/pathlib.py @@ -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.""") -- cgit v1.2.1