[issue5169] Default hash not equal to id on AMD Sempron
New submission from Chema Cortés : Sometimes, the default hash for user-defined object is not equal to the id of the object: In [1]: class A: ...: pass In [2]: a=A() In [3]: id(a),hash(a) Out[3]: (3082955212L, -1212012084) The test box has an AMD Sempron, a 64bit CPU archictecture emulating a 32bit one. This following relation can be deduced: hash(a)=id(a)-2**32 -- components: Interpreter Core messages: 81269 nosy: chemacortes, jcea severity: normal status: open title: Default hash not equal to id on AMD Sempron type: behavior versions: Python 2.5 ___ Python tracker <http://bugs.python.org/issue5169> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5169] Default hash not equal to id on AMD Sempron
Chema Cortés added the comment: I also agree to close this bug as invalid. Indeed, there is not any reason to make equal id(a) and hash(a), but the description of "hashable" object from the documentation (but this is a different issue). 'hash' and 'id' returns the same-wordsize integer (32bit): 'id' as unsigned long (Py_uintptr_t), and 'hash' as signed long casted from 'id'. Thanks for your time, Chema ___ Python tracker <http://bugs.python.org/issue5169> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5186] Reduce hash collisions for objects with no __hash__ method
Changes by Chema Cortés : -- nosy: +chemacortes ___ Python tracker <http://bugs.python.org/issue5186> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26156] Bad name into power operator syntax
New submission from Chema Cortés: The documentation erroneously changes "primary" for "away" in the power operator syntax: https://docs.python.org/3.6/reference/expressions.html#the-power-operator https://docs.python.org/3.5/reference/expressions.html#the-power-operator -- assignee: docs@python components: Documentation messages: 258596 nosy: Chema Cortés, docs@python priority: normal severity: normal status: open title: Bad name into power operator syntax versions: Python 3.5, Python 3.6 ___ Python tracker <http://bugs.python.org/issue26156> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com