Alex Waygood <alex.wayg...@gmail.com> added the comment:

It looks like __class_getitem__ was added to PurePath at @asvetlov's request  
in PR 17498. But, I'm also not quite sure why. The class is not generic in 
typeshed, so type-checkers will raise an error if you do PurePath[str], even if 
it is possible to do so at runtime.

Typeshed stub for PurePath: 
https://github.com/python/typeshed/blob/dff461fc6adef1ec3a4b58af5abdf0cdebf2429a/stdlib/pathlib.pyi#L20

----------
nosy: +AlexWaygood, asvetlov

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46483>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to