A __repr__ for Pairs

This commit is contained in:
Kovid Goyal
2020-01-28 22:24:26 +05:30
parent c047e5f16a
commit d7dfc85cf7

View File

@@ -964,6 +964,10 @@ class Pair:
self.one = self.two = None
self.bias = 0.5
def __repr__(self):
return 'Pair(horizontal={}, bias={:.2f}, one={}, two={})'.format(
self.horizontal, self.bias, self.one, self.two)
def all_window_ids(self):
if self.one is not None:
if isinstance(self.one, Pair):