This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author brodie
Recipients brodie, georg.brandl
Date 2008-05-15.01:16:41
SpamBayes Score 0.0007486416
Marked as misclassified No
Message-id <1210814208.45.0.272157928062.issue2856@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2008-05-15 01:16:51brodiesetspambayes_score: 0.000748642 -> 0.0007486416
recipients: + brodie, georg.brandl
2008-05-15 01:16:48brodiesetspambayes_score: 0.000748642 -> 0.000748642
messageid: <1210814208.45.0.272157928062.issue2856@psf.upfronthosting.co.za>
2008-05-15 01:16:45brodielinkissue2856 messages
2008-05-15 01:16:41brodiecreate