Re: File system path annotations

2023-06-19 Thread Thomas Passin via Python-list
On 6/19/2023 10:04 AM, Roel Schroeven via Python-list wrote: Op 19/06/2023 om 11:44 schreef Peter Slížik: Thank you, Roel. You've answered all my questions. > [PEP 519]: ...as that can be represented with typing.Union[str, bytes, os.PathLike] easily enough and the hope is users > will slowly

Re: File system path annotations

2023-06-19 Thread Roel Schroeven via Python-list
Op 19/06/2023 om 11:44 schreef Peter Slížik: Thank you, Roel. You've answered all my questions. > [PEP 519]: ...as that can be represented with typing.Union[str, bytes, os.PathLike] easily enough and the hope is users > will slowly gravitate to path objects only. I read a lot on Python and,

Re: File system path annotations

2023-06-19 Thread Peter Slížik via Python-list
Thank you, Roel. You've answered all my questions. > [PEP 519]: ...as that can be represented with typing.Union[str, bytes, os.PathLike] easily enough and the hope is users > will slowly gravitate to path objects only. I read a lot on Python and, frankly, I don't see this happening. People on

Re: File system path annotations

2023-06-19 Thread Roel Schroeven via Python-list
Op 19/06/2023 om 10:43 schreef Peter Slížik via Python-list: Hello, what is the preferred way of annotating file system paths? This StackOverflow answer (and a few others) recommend using the str | os.PathLike union. However, byte arrays can be

File system path annotations

2023-06-19 Thread Peter Slížik via Python-list
Hello, what is the preferred way of annotating file system paths? This StackOverflow answer (and a few others) recommend using the str | os.PathLike union. However, byte arrays can be used as paths too, and including them would make the