Author ned.deily
Recipients G..Scott.Johnston, ned.deily
Date 2013-08-28.06:45:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1377672308.84.0.110957126715.issue18863@psf.upfronthosting.co.za>
In-reply-to
Content
See http://docs.python.org/2/library/functions.html#unicode.  It appears to me that unicode() is behaving exactly as documented. In particular:

"If encoding and/or errors are given, unicode() will decode the object which can either be an 8-bit string or a character buffer using the codec for encoding."

"If no optional parameters are given, unicode() will mimic the behaviour of str() except that it returns Unicode strings instead of 8-bit strings. More precisely, if object is a Unicode string or subclass it will return that Unicode string without any additional decoding applied."

One can argue about whether this documented behavior makes the most sense but, since it is documented to behave that way and that any significant changes to that behavior at this late stage of the life of Python 2 could break existing programs, I think there will be little support for making such a change now.  Sorry!
History
Date User Action Args
2013-08-28 06:45:08ned.deilysetrecipients: + ned.deily, G..Scott.Johnston
2013-08-28 06:45:08ned.deilysetmessageid: <1377672308.84.0.110957126715.issue18863@psf.upfronthosting.co.za>
2013-08-28 06:45:08ned.deilylinkissue18863 messages
2013-08-28 06:45:08ned.deilycreate