diff --git a/duodecimal.py b/duodecimal.py index 20657c4..f5f992a 100644 --- a/duodecimal.py +++ b/duodecimal.py @@ -145,7 +145,10 @@ class duo: return self.decimal def __repr__(self): - return self.duodecimal[:7].rstrip('0') + '(base12)' - + if '.' in self.duodecimal: + return self.duodecimal[:7].rstrip('0') + '(base12)' + else: + return self.duodecimal + '(base12)' + def __str__(self): return self.duodecimal \ No newline at end of file