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, andrei.avk, barry, cheryl.sabella, corona10, gvanrossum, karlcow, mrabarnett, serhiy.storchaka, syeberman, veky
Date 2021-06-05.09:46:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1622886390.38.0.690161597618.issue28937@roundup.psfhosted.org>
In-reply-to
Content
Andrei: That is a very interesting observation, thank you for pointing it out. I guess your example / argument also currently applies to whitespace separation too. For example, if we have a whitespace separated string with contents:

col1 col2 col3
a b c

x y z

then using [row.split() for row in contents.splitlines()] results in
[['col1', 'col2', 'col3'], ['a', 'b', 'c'], [], ['x', 'y', 'z']]

However if later a user appends the row:

p  q

aiming to have p, and empty cell and then q then they will actually get

[['col1', 'col2', 'col3'], ['a', 'b', 'c'], [], ['x', 'y', 'z'], ['p', 'q']]

So at least this patch results in behaviour that is consistent with how split currently works. 

Are you suggesting that this is something that could be addressed by clearer documentation or using a different flag name?
History
Date User Action Args
2021-06-05 09:46:30Mark.Bellsetrecipients: + Mark.Bell, gvanrossum, barry, syeberman, mrabarnett, karlcow, serhiy.storchaka, Catherine.Devlin, veky, cheryl.sabella, corona10, ZackerySpytz, Philippe Cloutier, andrei.avk
2021-06-05 09:46:30Mark.Bellsetmessageid: <1622886390.38.0.690161597618.issue28937@roundup.psfhosted.org>
2021-06-05 09:46:30Mark.Belllinkissue28937 messages
2021-06-05 09:46:29Mark.Bellcreate