On Wed, 2006-28-06 at 14:01 +0200, Andreas Jung wrote:
--On 28. Juni 2006 13:56:58 +0200 Florent Guillaume <fg@nuxeo.com> wrote:
Has this change been discussed? I don't agree with it. Unicode strings aren't byte strings. File and Image should only work with byte strings. Code dealing with them should always know and assume that they use str. Anything using unicode with them is broken or has done insufficient input validation.
I agree. This checkin must be reverted. In fact one raise a ValueError in case the data is a unicode string.
Alrighty, reverting change. Sorry about the confusion. The more I think about this the more I agree. I'll still change the logic to do isinstance(data, str) rather than type('') == type(data) and I'll also add the explicit check for unicode and raise a ValueError if found, does this all sound ok? - Rocky -- Rocky Burt ServerZen Software -- http://www.serverzen.com News About The Server (blog) -- http://www.serverzen.net