This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steven.daprano
Recipients Dennis Sweeney, f-brinkmann, steven.daprano
Date 2021-02-21.01:46:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1613871982.07.0.0263371425395.issue43280@roundup.psfhosted.org>
In-reply-to
Content
Looking more closely, I think that the semantics are to concatenate the extra argument to the second-last item:

    ", ".join(["a", "b", "c"])
    # -> "a, b, c"

    ", ".join(["a", "b", "c"], ", and")
    # -> "a, b, and, c"

which would be the same as:

    ", ".join(["a", "b, and", "c"])
    # -> "a, b, and, c"


I'm not sure how this is useful. In English, there should never be a comma after the "and", and there possibly shouldn't be a comma after the "b" either, depending on context.

    # Should be: "a, b and c" or "a, b, and c"

See the Oxford or serial comma:

https://thegrammargirls.wordpress.com/tag/oxford-comma/


I'm going to close this feature request. It's too specific and the semantics don't seem to be very useful. But if you would still like to propose this, or a similar change, please discuss it first either on the Python-Ideas mailing list:

    https://mail.python.org/archives/list/python-ideas@python.org/


or at the Ideas topic on

    https://discuss.python.org


so that we can determine the required semantics and get a sense for how useful it would be in general.
History
Date User Action Args
2021-02-21 01:46:22steven.dapranosetrecipients: + steven.daprano, Dennis Sweeney, f-brinkmann
2021-02-21 01:46:22steven.dapranosetmessageid: <1613871982.07.0.0263371425395.issue43280@roundup.psfhosted.org>
2021-02-21 01:46:22steven.dapranolinkissue43280 messages
2021-02-21 01:46:21steven.dapranocreate