def __repr__(self):
        """A detailed string representation for this object."""

        # print additional info only if there are attributes to show
        attrnames = [n for n in self._v_attrnames]
        if len(attrnames):
            rep = ['%s := %r' % (attr, getattr(self, attr))
                   for attr in attrnames]
            attrlist = '[%s]' % (',\n    '.join(rep))

            return "%s:\n   %s" % (str(self), attrlist)
        else:
            return str(self)
dataset/ETHPy150Open PyTables/PyTables/tables/attributeset.py/AttributeSet.__repr__/original