A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2016-May/144586.html below:

[Python-Dev] File system path PEP, part 2

[Python-Dev] File system path PEP, part 2Nick Coghlan ncoghlan at gmail.com
Fri May 13 07:56:34 EDT 2016
On 13 May 2016 at 21:00, Steven D'Aprano <steve at pearwood.info> wrote:
> On Thu, May 12, 2016 at 08:53:12PM +0000, Brett Cannon wrote:
>
>> Second draft that takes Guido's comments into consideration. The biggest
>> change is os.fspath() now returns whatever path.__fspath__() returns
>> instead of restricting it to only str.
>
> Counter suggestion:
>
> - __fspath__() method may return either bytes or str (no change
>   from the PEP as it stands now);
>
> - but os.fspath() will only return str;
>
> - and os.fspathb() will only return bytes;

We don't have any use cases for a bytes-only API - only str-or-bytes
(in the polymorphic low level functions) and str-only (in newer high
level APIs like pathlib).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4