- class prepr(obj, maxlen=None, maxitems=None, skip=None, dividerchar='—', dividerlen=60, use_repr=True, maxtime=3, die=False, debug=False)[source]#
Akin to “pretty print”, returns a pretty representation of an object – all attributes (except any that are skipped), plust methods and ID. Usually used via the interactive
sc.pr()(which prints), rather than this (which returns a string).
obj (anything) – the object to be represented
maxlen (int) – maximum number of characters to show for each item
maxitems (int) – maximum number of items to show in the object
skip (list) – any properties to skip
dividerchar (str) – divider for methods, attributes, etc.
dividerlen (int) – number of divider characters
use_repr (bool) – whether to use repr() or str() to parse the object
maxtime (float) – maximum amount of time to spend on trying to print the object
die (bool) – whether to raise an exception if an error is encountered
debug (bool) – print out detail during string construction
New in version 3.0.0: “debug” argument