Author r.david.murray
Recipients Guillaume.Bouchard, docs@python, r.david.murray
Date 2011-12-06.13:12:16
SpamBayes Score 1.33471e-12
Marked as misclassified No
Message-id <>
I agree with you that this is inconsistent.  However, having str raise an error is pretty much a non-starter as a suggestion.  str always falls back to the repr; in general str(obj) should always return some value, otherwise the assumptions of a *lot* of Python code would be broken.

Personally I'm not at all sure why str takes encoding and errors arguments (I never use them). I'd rather there be only one way to do that, decode.  In other words, why do we have special case support for byte strings in the str conversion function?

But I don't think that can be changed either, so I think we are stuck with documenting the existing situation better.  Do you want to propose a doc patch?
Date User Action Args
2011-12-06 13:12:17r.david.murraysetrecipients: + r.david.murray, docs@python, Guillaume.Bouchard
2011-12-06 13:12:17r.david.murraysetmessageid: <>
2011-12-06 13:12:16r.david.murraylinkissue13538 messages
2011-12-06 13:12:16r.david.murraycreate