FormatSet
exprint.formatter.FormatSet
FormatSet(formatter: Formatter)
Class for formatting set of items.
Source code in exprint/formatter.py
value
value(value: Any) -> FormatSeq
Adds a value to the sequence output.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Any
|
Value to add. |
required |
Returns:
| Type | Description |
|---|---|
FormatSeq
|
Itself |
Examples:
Source code in exprint/formatter.py
value_with
Adds a value to the sequence output. Equivalent to FormatSeq.value
but formats the value using a function.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Callable[[Formatter], Format]
|
Value function. |
required |
Returns:
| Type | Description |
|---|---|
FormatSeq
|
Itself |
Examples:
Source code in exprint/formatter.py
values
values(values: SizedIterable) -> FormatSeq
Adds all values to the sequence output.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
SizedIterable
|
Sequence of values which must be iterable and sized. |
required |
Returns:
| Type | Description |
|---|---|
FormatSeq
|
Itself |
Examples: