mirror of
https://github.com/beetbox/beets.git
synced 2025-12-15 21:14:19 +01:00
Add unicode() for Distance: show the distance
This commit is contained in:
parent
dbef31776f
commit
154917bbd1
1 changed files with 3 additions and 0 deletions
|
|
@ -361,6 +361,9 @@ class Distance(object):
|
|||
def __rsub__(self, other):
|
||||
return other - self.distance
|
||||
|
||||
def __unicode__(self):
|
||||
return "{0:.2f}".format(self.distance)
|
||||
|
||||
# Behave like a dict.
|
||||
|
||||
def __getitem__(self, key):
|
||||
|
|
|
|||
Loading…
Reference in a new issue