join_as_many_as_possible
full name: tenpy.tools.string.join_as_many_as_possible
parent module:
tenpy.tools.stringtype: function
- tenpy.tools.string.join_as_many_as_possible(msgs: Sequence[str], separator: str, priorities: Sequence[int] = None, max_len: int = None, fill: str = '...') str[source]
Like
separator.join(msgs)but truncated if the result is too long.We append the
fillvalue to indicate that entries were omitted. By default, the first entries inmsgsare kept. Ifprioritiesare specified, the messages are sorted according to their priority first (from high to low).