python 2.7 and unicode (one more time)

Ethan Furman ethan at
Thu Nov 20 22:29:49 CET 2014

On 11/20/2014 07:53 AM, Chris Angelico wrote:
> On Fri, Nov 21, 2014 at 2:40 AM, Peter Otten <__peter__ at> wrote:
>> I think that you may get a Unicode/Encode/Error when you try to /decode/ a
>> unicode string is more confusing...
> Hang on a minute, what does it even mean to decode a Unicode string?
> That's where the problem is. Fortunately that's one that Py3 solved -
> str simply doesn't have a decode() method.

If your unicode string happens to contain a base64 encoded .png, then you could decode that into bytes.  ;)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the Python-list mailing list