Bugs item #1460886, was opened at 2006-03-29 19:16 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1460886&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Unicode Group: None Status: Open Resolution: None Priority: 5 Submitted By: Joe Wreschnig (piman) Assigned to: M.-A. Lemburg (lemburg) Summary: Broken __hash__ for Unicode objects Initial Comment: http://docs.python.org/ref/customization.html says equal objects should hash to the same value. But this is not the case when the default Unicode encoding has been changed (by e.g. importing PyGTK). Using Python 2.4.2: >>> import sys >>> reload(sys) <module 'sys' (built-in)> >>> sys.setdefaultencoding('utf-8') >>> hash(u"\u1234"), hash(str(u"\u1234")) (-518661067, -1855038154) >>> u"\u1234" == str(u"\u1234") True ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1460886&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com