summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hogenson <rayhogenson@openmailbox.org>2016-10-16 14:35:46 -0400
committerRaymond Hogenson <rayhogenson@openmailbox.org>2016-10-16 14:35:46 -0400
commit7bb99edd9ac78bee36b6f748f3016a27ace9afce (patch)
tree94a67c0c01421965f2c19d3ea4ef86085864a8fa
parente717c90bbdc3089f64c943afb98f44df031cab18 (diff)
downloadbridge-7bb99edd9ac78bee36b6f748f3016a27ace9afce.tar.zst
Add __unicode__ to Vector
-rw-r--r--color.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/color.py b/color.py
index c65252b..8f7f72c 100644
--- a/color.py
+++ b/color.py
@@ -50,6 +50,12 @@ class Vector(object):
new_y = self.x * sintheta + self.y * costheta
return self.__class__(new_x, new_y)
+ def __unicode__(self):
+ return '<{}, {}, {}>'.format(self.x, self.y, self.z)
+
+ def __str__(self):
+ return unicode(self)
+
@property
def components(self):