summaryrefslogtreecommitdiffstats
path: root/Lib/os.py
diff options
context:
space:
mode:
authorBatuhan Taşkaya <47358913+isidentical@users.noreply.github.com>2019-12-08 20:31:15 (GMT)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-12-08 20:31:15 (GMT)
commit526606baf76e7a5309bb00f3bfaefa861a2014ba (patch)
treea08b64df10f2a555fbc2c45be3849750fbbb9d52 /Lib/os.py
parentcd90a52983db34896a6335a572d55bdda274778f (diff)
downloadcpython-526606baf76e7a5309bb00f3bfaefa861a2014ba.zip
cpython-526606baf76e7a5309bb00f3bfaefa861a2014ba.tar.gz
cpython-526606baf76e7a5309bb00f3bfaefa861a2014ba.tar.bz2
bpo-38994: Implement __class_getitem__ for PathLike (GH-17498)
https://bugs.python.org/issue38994
Diffstat (limited to 'Lib/os.py')
-rw-r--r--Lib/os.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/os.py b/Lib/os.py
index 52d3f1d..c901bd1 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -1072,6 +1072,9 @@ class PathLike(abc.ABC):
def __subclasshook__(cls, subclass):
return hasattr(subclass, '__fspath__')
+ def __class_getitem__(cls, type):
+ return cls
+
if name == 'nt':
class _AddedDllDirectory: