]> git.llucax.com Git - software/pymin.git/blobdiff - pymin/seqtools.py
Bugfix: use hasattr() right when looking for help.
[software/pymin.git] / pymin / seqtools.py
index d3de9299446b70b913f77ba293b9c0cccceeac6b..4a6338adf28acf9d85626349f6266e0fe077ff4b 100644 (file)
@@ -39,8 +39,14 @@ class Sequence:
         r"obj[i] -> object :: Get item with the index i."
         return self.as_tuple()[i]
 
         r"obj[i] -> object :: Get item with the index i."
         return self.as_tuple()[i]
 
+    def __unicode__(self):
+        return u'%s%r' % (self.__class__.__name__, self.as_tuple())
+
+    def __str__(self):
+        return unicode(self).encode('utf-8')
+
     def __repr__(self):
     def __repr__(self):
-        return '%s%r' % (self.__class__.__name__, self.as_tuple())
+        return str(self)
 
 def as_tuple(obj):
     r"""as_tuple(obj) -> tuple :: Convert objects to tuple.
 
 def as_tuple(obj):
     r"""as_tuple(obj) -> tuple :: Convert objects to tuple.