Make set aware of Attribute categories

This commit is contained in:
Griatch 2021-12-16 00:22:24 +01:00
parent 5b85ec128e
commit 72ad633071
5 changed files with 182 additions and 97 deletions

View file

@ -395,12 +395,13 @@ def iter_to_str(iterable, endsep=", and", addquote=False):
"""
if not iterable:
return ""
iterable = list(make_iter(iterable))
len_iter = len(iterable)
if addquote:
iterable = tuple(f'"{val}"' for val in make_iter(iterable))
iterable = tuple(f'"{val}"' for val in iterable)
else:
iterable = tuple(str(val) for val in make_iter(iterable))
iterable = tuple(str(val) for val in iterable)
if endsep.startswith(","):
# oxford comma alternative