ReprMixin

Defined in module: wield.declarative.utilities.representations.ReprMixin

class ReprMixin(*args, **kwargs)[source][github]

Bases: SuperBase

A mixin class inherited in front of/instead of object which gives any object a decent __repr__ function. The object can additionally define a list in one of __slots__ or __repr_slots__ which gives attributes for this repr function to report.

If __repr_slots__ is given, it will take precedence over any __slots__. For extended inheritance heirerarchies, the attributes are stacked, with superclass attributes listed before subclass attributes.

__repr_slots__[github]

This is a list of the attribute names for the repr to display. One should be placed in any subclass using this mixin that needs specific members displayed.

__repr__()[source][github]

Return repr(self).

__init__(**kwargs)[github]

Methods

__init__(**kwargs)