Re: Working with paths

2023-07-16 Thread Kushal Kumaran via Python-list
On Sun, Jul 16 2023 at 03:58:07 PM, Peter Slížik wrote: > Hello, > > I finally had a look at the pathlib module. (Should have done it long ago, > but anyway...). Having in mind the replies from my older thread (File > system path annotations), what is the best way to support all possible path > ty

Working with paths

2023-07-16 Thread Peter Slížik via Python-list
Hello, I finally had a look at the pathlib module. (Should have done it long ago, but anyway...). Having in mind the replies from my older thread (File system path annotations), what is the best way to support all possible path types? def doit(path: str | bytes | os.PathLike): match path: case st