[Python-Dev] Python-3.0, unicode, and os.environ

Guido van Rossum guido at python.org
Fri Dec 5 21:11:28 CET 2008


On Fri, Dec 5, 2008 at 12:05 PM, Toshio Kuratomi <a.badger at gmail.com> wrote:
> Guido van Rossum wrote:
>> On Fri, Dec 5, 2008 at 2:27 AM, Ulrich Eckhardt <eckhardt at satorlaser.com> wrote:
>>> In 99% of all cases, using the default encoding will work and do what people
>>> expect, which is why I would make this conversion automatic. In all other
>>> cases, it will at least not fail silently (which would lead to garbage and
>>> data loss) and allow more sophisticated applications to handle it.
>>
>> I think the "always fail noisily" approach isn't the best approach.
>> E.g. if I am globbing for *.py, and there's an undecodable .txt file
>> in a directory, its presence shouldn't cause the glob to fail.
>>
> But why should it make glob() fail?  This sounds like an implementation
> detail of glob.

Glob was just an example. Many use cases for directory traversal
couldn't care less if they see *all* files.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list