summaryrefslogtreecommitdiff
path: root/cliff/columns.py
diff options
context:
space:
mode:
Diffstat (limited to 'cliff/columns.py')
-rw-r--r--cliff/columns.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/cliff/columns.py b/cliff/columns.py
index b9cac5e..3462176 100644
--- a/cliff/columns.py
+++ b/cliff/columns.py
@@ -31,6 +31,12 @@ class FormattableColumn(object, metaclass=abc.ABCMeta):
self.__class__ == other.__class__ and self._value < other._value
)
+ def __str__(self):
+ return self.human_readable()
+
+ def __repr__(self):
+ return '%s(%r)' % (self.__class__.__name__, self.machine_readable())
+
@abc.abstractmethod
def human_readable(self):
"""Return a basic human readable version of the data."""