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 Mark.Bell
Recipients Catherine.Devlin, Mark.Bell, Philippe Cloutier, ZackerySpytz, barry, cheryl.sabella, corona10, gvanrossum, karlcow, mrabarnett, serhiy.storchaka, syeberman, veky
Date 2021-05-18.17:07:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> suggests that empty strings don't count towards maxsplit

Thank you for the confirmation. Although just to clarify I guess you really mean "empty strings *that are dropped from the output* don't count towards maxsplit". Just to double check this, what do we expect the output of

    '   x y z'.split(maxsplit=1, keepempty=True)

to be?

I think it should be ['', '  x y z'] since in this case we are retaining empty strings and they should count towards the maxsplit.

(In the current patch this crashes with a core dump since it tries to write to unallocated memory)
Date User Action Args
2021-05-18 17:07:52Mark.Bellsetrecipients: + Mark.Bell, gvanrossum, barry, syeberman, mrabarnett, karlcow, serhiy.storchaka, Catherine.Devlin, veky, cheryl.sabella, corona10, ZackerySpytz, Philippe Cloutier
2021-05-18 17:07:52Mark.Bellsetmessageid: <>
2021-05-18 17:07:52Mark.Belllinkissue28937 messages
2021-05-18 17:07:52Mark.Bellcreate