[issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal

2016-12-19 Thread STINNER Victor
STINNER Victor added the comment: I updated the doc of Python 2.7, 3.5, 3.6 and default (3.7). Thanks for the suggestion Kevin, thanks for the review Naoki. -- resolution: -> fixed status: open -> closed versions: -Python 3.3, Python 3.4 ___

[issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal

2016-12-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset fac2362f248c by Victor Stinner in branch '2.7': doc: Suggest to hash(tuple of attr) rather than XOR https://hg.python.org/cpython/rev/fac2362f248c -- ___ Python tracker

[issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal

2016-12-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset cb802a78ceea by Victor Stinner in branch '3.5': doc: Suggest to hash(tuple of attr) rather than XOR https://hg.python.org/cpython/rev/cb802a78ceea -- nosy: +python-dev ___ Python tracker

[issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal

2016-12-19 Thread INADA Naoki
INADA Naoki added the comment: LGTM -- nosy: +inada.naoki ___ Python tracker ___ ___ Python-bugs-list mailing

[issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: Christian Heimes: > ACK! Does it mean that my patch LGTY? -- ___ Python tracker ___

[issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal

2016-10-18 Thread Christian Heimes
Christian Heimes added the comment: ACK! -- nosy: +christian.heimes ___ Python tracker ___ ___

[issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: hash(tuple of attributes) is what I'm using in all my projects. Here is a patch for the doc. -- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file45133/hash_doc.patch ___ Python tracker

[issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal

2016-10-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This makes sense. Note that this is the way hashes are implemented for the datetime objects: . -- nosy: +belopolsky ___ Python tracker

[issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal

2016-10-07 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list

[issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal

2016-10-06 Thread Kevin Norris
New submission from Kevin Norris: The documentation for __hash__ contains this text: "The only required property is that objects which compare equal have the same hash value; it is advised to somehow mix together (e.g. using exclusive or) the hash values for the components of the object that