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/2008-September/082674.html below:

[Python-Dev] [Python-3000] Patch for an initial support of bytes filename in Python3

[Python-Dev] [Python-3000] Patch for an initial support of bytes filename in Python3 [Python-Dev] [Python-3000] Patch for an initial support of bytes filename in Python3Guido van Rossum guido at python.org
Tue Sep 30 18:47:10 CEST 2008
On Tue, Sep 30, 2008 at 8:47 AM, Bill Janssen <janssen at parc.com> wrote:
> Victor Stinner <victor.stinner at haypocalc.com> wrote:
>
>>  - listdir(unicode) -> only unicode, *skip* invalid filenames
>>    (as asked by Guido)
>
> Is there an option listdir(bytes) which will return *all* filenames (as
> byte sequences)?  Otherwise, this seems troubling to me; *something*
> should be returned for filenames which can't be represented, even if
> it's only None.

Yes, os.listdir() becomes polymorphic -- if you pass it a pathname in
bytes the output is in bytes and it will return everything exactly as
the underlying syscall returns it to you.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
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