os.lisdir, gets unicode, returns unicode... USUALLY?!?!?

Fredrik Lundh fredrik at pythonware.com
Sat Nov 18 01:51:19 EST 2006


Martin v. Löwis wrote:

>> How about returning two lists, first list contains unicode names, the
>> second list contains undecodable names:
>>
>> files, troublesome = os.listdir(separate_errors=True)
>>
>> and make separate_errors=True by default in python 3.0 ?
> 
> That would be quite an incompatible change, no?

it also violates a fundamental design rule for the standard library.

</F>




More information about the Python-list mailing list