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

[Python-Dev] Defining a path protocol (was: When should pathlib stop being provisional?)

[Python-Dev] Defining a path protocol (was: When should pathlib stop being provisional?)Koos Zevenhoven k7hoven at gmail.com
Sat Apr 9 06:51:23 EDT 2016
On Sat, Apr 9, 2016 at 10:16 AM, Ethan Furman <ethan at stoneleaf.us> wrote:
> On 04/09/2016 12:07 AM, Victor Stinner wrote:
>>
>> os.DirEntry doesn't support bytes: os.scandir() only accept str. It's a
>> deliberate choice.
>
>
> 3.5.0 scandir supports bytes:
>
> --> huh = list(scandir(b'.'))
> --> huh
> [<DirEntry b'minicourse-ajax-project'>, <DirEntry b'js'>, <DirEntry
> b'__MACOSX'>, <DirEntry b'index.xaml'>, <DirEntry b'css'>, <DirEntry
> b'index.html'>]
>
> --> huh[0].path
> b'./minicourse-ajax-project'
>
>

Maybe it's the bytes support in scandir that should be deprecated?
(And not bytes support in general, which cannot be done on posix, as I
hear Stephen T. will tell me).

-Koos
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