[Python-ideas] Type hinting for path-related functions

Koos Zevenhoven k7hoven at gmail.com
Fri May 13 19:14:16 EDT 2016


On Sat, May 14, 2016 at 2:05 AM, Brett Cannon <brett at python.org> wrote:
>
>
> On Fri, 13 May 2016 at 15:09 Koos Zevenhoven <k7hoven at gmail.com> wrote:
>>
>> On Fri, May 13, 2016 at 11:50 PM, Ethan Furman <ethan at stoneleaf.us> wrote:
>> > On 05/13/2016 01:30 PM, Koos Zevenhoven wrote:
>> >
>> >> It turns out it has been almost a month since this, and the PEP draft
>> >> is already looking good. It seems we might now be ready to discuss it.
>> >> Should we add the generic type FSPath[str]?
>> >
>> >
>> > Guido's post on one of the other threads:
>> > ----------------------------------------
>> >> There's no need for typing.PathLike.
>> >
>> > So I'm gonna say no.  ;)
>> >
>>
>> Oh, it looks like a read those two emails in the wrong order ;).
>>
>> Anyway, I was going to suggest making the abstract base class
>> subscriptable too like this: PathABC[str] is a str-based path ABC, and
>> PathABC[bytes] a bytes-based one ;). I don't know if that should be
>> called a generic type or not, though.
>
>
> The PEP already addresses this and says "no".

I obviously know the PEP very well, and it doesn't. But I'm probably
just doing a bad job explaining what I mean right now, and should
probably go to bed. Sorry.

-- Koos


More information about the Python-ideas mailing list