Nicer repr for tab stops

This commit is contained in:
Kovid Goyal 2015-01-08 09:02:59 +05:30
parent bcaabdfe08
commit 8ee0c106ff

View File

@ -166,6 +166,11 @@ class EditorTabStop(object):
def __exit__(self, *args):
self.join_previous_edit = False
def __repr__(self):
return 'EditorTabStop(num=%r text=%r left=%r right=%r is_deleted=%r mirrors=%r)' % (
self.num, self.text, self.left, self.right, self.is_deleted, self.mirrors)
__str__ = __unicode__ = __repr__
def apply_selected_text(self, text):
if self.takes_selection and not self.is_deleted:
with self: