From aeaff1d663ce246f80e60d9b6c5ff2db3358c6ef Mon Sep 17 00:00:00 2001 From: InspectorCaracal Date: Tue, 28 Jun 2022 15:57:33 -0600 Subject: [PATCH] update docstring --- evennia/utils/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/evennia/utils/utils.py b/evennia/utils/utils.py index 862feed925..ec7ef37ff2 100644 --- a/evennia/utils/utils.py +++ b/evennia/utils/utils.py @@ -372,6 +372,7 @@ def iter_to_str(iterable, sep=",", endsep=", and", addquote=False): iterable (any): Usually an iterable to print. Each element must be possible to present with a string. Note that if this is a generator, it will be consumed by this operation. + sep (str, optional): The string to use as a separator for each item in the iterable. endsep (str, optional): The last item separator will be replaced with this value. addquote (bool, optional): This will surround all outgoing values with double quotes. @@ -389,7 +390,9 @@ def iter_to_str(iterable, sep=",", endsep=", and", addquote=False): '1, 2, 3' >>> list_to_string([1,2,3], ensdep='and') '1, 2 and 3' - >>> list_to_string([1,2,3], endsep=', and', addquote=True) + >>> list_to_string([1,2,3], sep=';', endsep=';') + '1; 2; 3' + >>> list_to_string([1,2,3], addquote=True) '"1", "2", and "3"' ```