ytrstu / pyeuclid

Automatically exported from code.google.com/p/pyeuclid
0 stars 0 forks source link

Vector classes should raise on __hash__ #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
>>> from euclid import Vector2
>>> s = { Vector2(1, 2) }
>>> Vector2(1, 2) in s
False

Vectors are mutable, so should be un-hashable, to prevent misleading behaviour 
in hashmap containers.

Original issue reported on code.google.com by tart...@gmail.com on 27 Aug 2010 at 2:23

GoogleCodeExporter commented 9 years ago

Original comment by tart...@gmail.com on 8 Nov 2010 at 8:47