New submission from Cameron Trando <ctra...@ucsd.edu>:

Currently os.PathLike[str] causes a runtime error; however, typeshed sees it as 
valid and mypy does not throw any errors on it. 

mypy treats it as os.PathLike[AnyStr] 

I already filed a bug on typeshed, see 
https://github.com/python/typeshed/issues/3202

And since mypy interprets it as useful, cpython should try and support it as 
well.

----------
messages: 350221
nosy: Cameron Trando
priority: normal
severity: normal
status: open
title: Support subscripting os.PathLike and make it valid at runtime
type: behavior
versions: Python 3.7

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

Reply via email to