[issue27085] Make it possible to select return type for os.listdir

Serhiy Storchaka report at bugs.python.org
Sun May 22 14:52:36 EDT 2016


Serhiy Storchaka added the comment:

You can just convert os.listdir() argument or result.

os.listdir(os.fsencode(strpath))
os.listdir(os.fsdecode(bytespath))
list(map(os.fsencode, os.listdir(strpath)))
list(map(os.fsdecode, os.listdir(bytespath)))

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27085>
_______________________________________


More information about the Python-bugs-list mailing list