Like it or not, people rely on this behavior. I don't think CPython
(or PyPy) can actually afford to change it. If so, documenting it
sounds like a better idea than leaving it undocumented only known to
the inner shrine
+1. I am relying on this.
Using decode() and encode() would break that predictability. But someone
suggested the use of transform() and untransform() instead. That would
clarify that the transformation is bytes bytes and Unicode string
Unicode string.
On 23 Apr 2013 05:50, Lennart Regebro rege...@gmail.com wrote:
On
to find bugs.
On the other hand, simply checking in `__cmp__` what Enum both values
belong to (since they do have a `enum` attribute) should allow us to
avoid cross-comparing instead of just raising a TypeError. It's not
very intuitive behavior IMHO.
Just my 2 cents.
--
Fábio Santos