Skip to content

Commit 3536a13

Browse files
committed
Fix insertend option in join function
1 parent 9011e70 commit 3536a13

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

stringutils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def join(strings, sep=', ', insertend=False):
1616
delimiter. If *insertend* is given and true, the delimiter is also included
1717
at the end of the string.
1818
"""
19-
return sep.join(strings)
19+
return sep.join(strings) + (sep if insertend else '')
2020

2121
def lines(string, keepends=False):
2222
"""

0 commit comments

Comments
 (0)