Пример #1
0
 def __repr__(self):
     fmt = u"<{cls} {coord}>"
     if self.title:
         fmt = u"<{cls} {title!r}!{coord}>"
     return safe_repr(
         fmt.format(cls=self.__class__.__name__,
                    title=self.title,
                    coord=self.coord))
Пример #2
0
 def __str__(self):
     coord = self._get_range_string()
     return safe_repr(coord)
Пример #3
0
 def __repr__(self):
     return '<%s "%s">' % (self.__class__.__name__, safe_repr(self.title))
Пример #4
0
 def __repr__(self):
     fmt = u"{coord}"
     if self.title:
         fmt = u"{title!r}!{coord}"
     return safe_repr(fmt.format(title=self.title, coord=self.coord))
Пример #5
0
 def __str__(self):
     coord = self._get_range_string()
     return safe_repr(coord)
Пример #6
0
 def __repr__(self):
     fmt = u"<{cls} {coord}>"
     if self.title:
         fmt = u"<{cls} {title!r}!{coord}>"
     return safe_repr(fmt.format(cls=self.__class__.__name__, title=self.title, coord=self.coord))
 def __repr__(self):
     fmt = u"<%(cls)s %(coord)s>"
     if self.title:
         fmt = u"<%(cls)s %(title)r!%(coord)s>"
     return safe_repr(fmt % dict(
         cls=self.__class__.__name__, title=self.title, coord=self.coord))