Use Playlist.__str__ code for __repr__ and __unicode__ too.
authorW. Trevor King <wking@drexel.edu>
Sat, 7 Aug 2010 15:22:27 +0000 (11:22 -0400)
committerW. Trevor King <wking@drexel.edu>
Sat, 7 Aug 2010 15:22:27 +0000 (11:22 -0400)
hooke/playlist.py

index 8444c9aac883f151e274a9810e7ef7ee4976326f..ab32bed4be4b25ec731829eab04dc445ebe3f2bf 100644 (file)
@@ -45,7 +45,13 @@ class NoteIndexList (list):
         self._index = 0
 
     def __str__(self):
-        return '<%s %s>' % (self.__class__.__name__, self.name)
+        return str(self.__unicode__())
+
+    def __unicode__(self):
+        return u'<%s %s>' % (self.__class__.__name__, self.name)
+
+    def __repr__(self):
+        return self.__str__()
 
     def _setup_item(self, item):
         """Perform any required initialization before returning an item.