From: Mark Wooding Date: Mon, 1 May 2017 00:38:30 +0000 (+0100) Subject: catacomb/__init__.py: Print groups properly. X-Git-Tag: 1.2.0~29 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/catacomb-python/commitdiff_plain/99d932fe7eb61d521268cf76f0adf41162a8f8fd?ds=sidebyside catacomb/__init__.py: Print groups properly. --- diff --git a/catacomb/__init__.py b/catacomb/__init__.py index c646fe8..bc050be 100644 --- a/catacomb/__init__.py +++ b/catacomb/__init__.py @@ -574,6 +574,11 @@ _augment(BinDHInfo, _tmp) class _tmp: def __repr__(me): return '%s(%r)' % (type(me).__name__, me.info) + def _repr_pretty_(me, pp, cyclep): + ind = _pp_bgroup_tyname(pp, me) + if cyclep: pp.text('...') + else: pp.pretty(me.info) + pp.end_group(ind, ')') _augment(Group, _tmp) class _tmp: