[issue7890] equal unicode/str objects can have unequal hash

lplatypus report at bugs.python.org
Tue Feb 9 11:38:14 CET 2010


lplatypus <luke at deller.id.au> 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 wrongly?

Other places that may need review include:
- the programming FAQ on python.org which presents the option of calling setdefaultencoding('mbcs') on windows ( http://www.python.org/doc/faq/programming/#what-does-unicodeerror-ascii-decoding-encoding-error-ordinal-not-in-range-128-mean )
- the comments in site.py which provoke changing the default encoding
- PEP100 which suggests enabling this code in site.py

BTW would patches ever be considered to fix issues such as this with using other encodings as default encodings, or is there some objection to the concept?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7890>
_______________________________________


More information about the Python-bugs-list mailing list