[New-bugs-announce] [issue37920] Support subscripting os.PathLike and make it valid at runtime

Cameron Trando report at bugs.python.org
Thu Aug 22 14:20:41 EDT 2019


New submission from Cameron Trando <ctrando at 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 <report at bugs.python.org>
<https://bugs.python.org/issue37920>
_______________________________________


More information about the New-bugs-announce mailing list