[Python-Dev] Pathlib enhancements - acceptable inputs and outputs for __fspath__ and os.fspath()

Ethan Furman ethan at stoneleaf.us
Wed Apr 13 12:30:37 EDT 2016


On 04/13/2016 09:18 AM, Fred Drake wrote:
> On Wed, Apr 13, 2016 at 11:09 AM, Ethan Furman wrote:
>> - a single os.fspath() with an allow_bytes parameter
>>    (mostly True in os and os.path, mostly False everywhere
>>    else)
>
> -0
>
>> - a str-only os.fspathname() and a str/bytes os.fspath()
>
> +1 on using separate functions.

> Names like os.fspath() and os.fssyspath() seem good to me.

Ooh, I like that!  I could probably keep those names separate in my 
head.  :)

--
~Ethan~



More information about the Python-Dev mailing list