Add a utility method to pretty printer for common Class(a, b, c=d) style output #2137

njsmith opened this Issue Jul 14, 2012 · 0 comments


None yet

2 participants


It'd be nice if common boring repr_pretty methods could just be written like:

def _repr_pretty_(self, p, cycle):
    assert not cycle
    p.pretty_constructor(self, [self.a, self.b], [("c", self.c)])

Something like this (extracted from the patsy source):

@minrk minrk removed the type-enhancement label Jan 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment