Marc-Andre Lemburg added the comment:
lplatypus wrote:
>
> lplatypus added the comment:
>
> Okay thanks, but in that case might I suggest that this limitation be
> mentioned in the documentation for sys.setdefaultencoding? It currently
> reads as if any available encoding is acceptable. Pe
lplatypus added the comment:
Okay thanks, but in that case might I suggest that this limitation be mentioned
in the documentation for sys.setdefaultencoding? It currently reads as if any
available encoding is acceptable. Perhaps even a warning or exception should be
produced when calling it
Martin v. Löwis added the comment:
This is not a bug in Python, but in your code. sys.setdefaultencoding is only
supported when setting the default encoding to either latin-1, or ascii, or
'undefined'. Setting it to any other value will have undesirable consequences
like the one you report. L
New submission from lplatypus :
The documentation for the hash() function says:
"Numeric values that compare equal have the same hash value (even if they are
of different types, as is the case for 1 and 1.0)"
This can be violated when comparing a unicode object with its str equivalent.
Here i