mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
bpo-38994: Implement __class_getitem__ for PathLike (GH-17498)
https://bugs.python.org/issue38994
This commit is contained in:
parent
cd90a52983
commit
526606baf7
5 changed files with 13 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue