[Python-Dev] Pathlib enhancements - acceptable inputs and outputs for __fspath__ and os.fspath()
wes.turner at gmail.com
Mon Apr 18 15:54:49 EDT 2016
On Apr 18, 2016 2:50 PM, "Ethan Furman" <ethan at stoneleaf.us> wrote:
> On 04/18/2016 12:25 PM, Stephen J. Turnbull wrote:
>> Koos Zevenhoven writes:
>>> After all, we want something that's *almost* exclusively str.
>> But we don't want that, AFAICT. Some clearly want this API to be
>> unbiased against bytes in the same way the os APIs are unbiased,
>> because that's what we've got in the current proposal.
> Are we reading the same thread? For my last several replies I am very
biased against bytes (and I know I'm not the only one).
> Just not so biased that I'm unwilling to let clients say, "No, I'm really
okay with getting bytes back".
> I really like Koos' ideas because they allow the client to say:
> - I only want str
> - I only want bytes
> - I'm okay with either
> If the client says "I'm okay with either" then I fully expect the client
to have code to properly handle str vs bytes after the fspath (or whatever
it's called) call.
Don't we *have* to always support bytes because other programs can create
filenames containing bytes?
> Python-Dev mailing list
> Python-Dev at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev