Changes between Version 3 and Version 4 of UnicodeDecodeError
- Timestamp:
- Jan 19, 2009, 3:03:20 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UnicodeDecodeError
v3 v4 28 28 }}} 29 29 30 == ... but I was encoding? == #encode 30 31 A 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: 31 32 {{{