join_as_many_as_possible

  • full name: tenpy.tools.string.join_as_many_as_possible

  • parent module: tenpy.tools.string

  • type: 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 fill value to indicate that entries were omitted. By default, the first entries in msgs are kept. If priorities are specified, the messages are sorted according to their priority first (from high to low).