[New-bugs-announce] [issue2856] os.listdir doc should mention that Unicode decoding can fail

Brodie Rao report at bugs.python.org
Thu May 15 03:16:48 CEST 2008

New submission from Brodie Rao <junk at dackz.net>:

The documentation for os.listdir should mention that there's a 
possibility that it can fail to decode paths to unicode objects and that 
it returns str objects for those paths it couldn't decode.

The documentation should also explain when this might happen, and 
perhaps how to deal with it. The cases that this could happen or how to 
work around it are beyond my knowledge, but #683592 does mention 
something about resetting the locale. I don't know if that comment is 
still relevant, or if it applies to all cases of decoding failure, 

I don't know if this behavior still exists in Python 2.6. If it does, 
the documentation for 2.6 should be amended as well.

assignee: georg.brandl
components: Documentation
messages: 66839
nosy: brodierao, georg.brandl
severity: normal
status: open
title: os.listdir doc should mention that Unicode decoding can fail
type: behavior
versions: Python 2.3, Python 2.4, Python 2.5

Tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list