[Python-Dev] Pathlib enhancements - acceptable inputs and outputs for __fspath__ and os.fspath()
Ethan Furman
ethan at stoneleaf.us
Mon Apr 11 16:19:39 EDT 2016
On 04/11/2016 12:00 PM, Brett Cannon wrote:
> On Mon, 11 Apr 2016 at 11:28 Ethan Furman wrote:
>> I would write the above as:
>>
>> def fspath(path, *, allow_bytes=False):
>
> You get type consistency from so.fspath(), not the protocol, though.
Well, since the protocol is also a function, we could put the
allow_bytes on that as well -- not sure if that is a good idea or not.
--
~Ethan~
More information about the Python-Dev
mailing list