Пример #1
0
 def __str__(self):
     if self.is_complete():
         return TreeEdge.__str__(self)
     else:
         bindings = '{%s}' % ', '.join('%s: %r' % item for item in
                                        sorted(self._bindings.items()))
         return '%s %s' % (TreeEdge.__str__(self), bindings)
Пример #2
0
 def __str__(self):
     if self.is_complete():
         return TreeEdge.__str__(self)
     else:
         bindings = '{%s}' % ', '.join(
             '%s: %r' % item for item in sorted(self._bindings.items()))
         return '%s %s' % (TreeEdge.__str__(self), bindings)