[issue44509] Build in type alias for paths

2021-06-25 Thread alex rakowski
alex rakowski added the comment: I just noticed this issue was raised and dismissed in PEP 519 -- Adding a file system path protocol. -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/i

[issue44509] Build in type alias for paths

2021-06-25 Thread alex rakowski
New submission from alex rakowski : Hello, I've noticed that when type hinting paths, it often becomes a bit verbose: from typing import Union import pathlib custom_path = Union[str, pathlib.Path] def foobar(x:custom_path): ... Writing functions which handle paths are pretty ro