Edgewall Software

Changes between Version 3 and Version 4 of UnicodeDecodeError


Ignore:
Timestamp:
Jan 19, 2009, 3:03:20 PM (15 years ago)
Author:
Christian Boos
Comment:

add #encode anchor

Legend:

Unmodified
Added
Removed
Modified
  • UnicodeDecodeError

    v3 v4  
    2828}}}
    2929
     30== ... but I was encoding? == #encode
    3031A more subtle and confusing way to trigger this error is when trying to ''encode'' a sequence of bytes to a given encoding. Wait... encoding a sequence of bytes? Does that even make sense? Well, normally not, but Python interprets that as a shortcut for encoding the `unicode` object corresponding to this string. So we have the following equivalence:
    3132{{{