Make vector test work in py3.

This commit is contained in:
Matthew Einhorn 2014-01-31 12:05:30 -05:00
parent 4a5cd38e5c
commit 5a88e8d128
1 changed files with 6 additions and 0 deletions

View File

@ -195,6 +195,12 @@ class Vector(list):
except Exception:
return Vector([x / val for x in self])
def __rtruediv__(self, val):
try:
return Vector(*val) / self
except Exception:
return Vector(val, val) / self
def __rdiv__(self, val):
try:
return Vector(*val) / self