cloup._util
¶
Generic utilities.
Functions Summary¶
|
|
|
|
|
Generate repr(obj). |
|
|
|
Contents¶
-
cloup._util.
make_repr
(obj, *args, _line_len: int = 60, _indent: int = 2, **kwargs) → str[source]¶ Generate repr(obj).
- Parameters
obj – object to represent
args – positional arguments in the repr
_line_len (int) – if the repr length exceeds this, arguments will be on their own line; if negative, the repr will be in a single line regardless of its length
_indent (int) – indentation width of arguments in case they are shown in their own line
kwargs – keyword arguments in the repr
- Returns
str
- Return type