chaomodus/pyeuclid

Vector classes should raise on __hash__

Closed this issue · 1 comments

>>> 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

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

  • Changed state: Fixed
  • Added labels: ****
  • Removed labels: ****