summaryrefslogtreecommitdiffstats
path: root/color.py
diff options
context:
space:
mode:
authorgroup1 <f16_group1@pbridge.adm.cs.cmu.edu>2016-10-16 22:12:51 -0400
committergroup1 <f16_group1@pbridge.adm.cs.cmu.edu>2016-10-16 22:12:51 -0400
commit22f814539e14312afb5627f7ad39905e9450209b (patch)
treeee0751e887600ed2a56bfc07a8bc34c537efcfda /color.py
parentPackage include path fix and add optimization for computing coverage (diff)
parentUse staticmethod instead of classmethod in by_type (diff)
downloadbridge-22f814539e14312afb5627f7ad39905e9450209b.tar.zst
Merge branch 'master' of https://github.com/rayhogenson/bridge
Conflicts: fish_show.py
Diffstat (limited to 'color.py')
-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):