New submission from Brodie Rao <[EMAIL PROTECTED]>: 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, however. 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 <[EMAIL PROTECTED]> <http://bugs.python.org/issue2856> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com