Cope 2.5.0
My personal "standard library" of all the generally useful code I've written for various projects over the years
|
str Cope.debugging.prettify | ( | Union[tuple, list, set, dict] | iterable, |
Literal['pprint', 'custom'] | method = 'custom' , |
||
int | width = ... , |
||
int | depth = ... , |
||
int | indent = 4 |
||
) |
"Cast" a tuple, list, set or dict to a string, automatically shorten it if it's long, and display how long it is.
Params: limitToLine: if True, limit the length of list to a single line minItems: show at least this many items in the list maxItems: show at most this many items in the list color: a simple int color
Note: If limitToLine is True, it will overrule maxItems, but not minItems
Definition at line 51 of file debugging.py.