Skip to content

Commit a5837a4

Browse files
committed
word_join: Use "connective" when joining lists of only two words
1 parent 432071c commit a5837a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

domdf_python_tools/words.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ def word_join(
528528
elif len(words) == 1:
529529
return words[0]
530530
elif len(words) == 2:
531-
return " and ".join(words)
531+
return f" {connective} ".join(words)
532532
else:
533533
if oxford:
534534
return delimiter.join(words[:-1]) + f"{delimiter}{connective} {words[-1]}"

0 commit comments

Comments
 (0)