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-April/144157.html below:

[Python-Dev] pathlib - current status of discussions

[Python-Dev] pathlib - current status of discussions [Python-Dev] pathlib - current status of discussionsEthan Furman ethan at stoneleaf.us
Thu Apr 14 12:46:13 EDT 2016
On 04/14/2016 08:59 AM, Michael Mysinger via Python-Dev wrote:

> I am saying that if os.path.join now accepts RichPath objects, and those
> objects can return either str or bytes, then its much harder to reason about
> when I have all bytes or all strings. In essence, you will force me to pre-
> wrap all RichPath objects in either os.fsencode(os.fspath(path)) or
> os.fsdecode(os.fspath(path)), just so I can reason about the type. And if I
> have to always do that wrapping then os.path.join doesn't need to accept
> RichPath objects and call fspath at all.

What many folks seem to be missing is that *you* (generic you) have 
control of your data.

If you are not working at the bytes layer, you shouldn't be getting 
bytes objects because:

- you specified str when asking for data from the OS, or
- you transformed the incoming bytes from whatever external source
   to str when you received them.

--
~Ethan~
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