Message395159
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? |
|
Date |
User |
Action |
Args |
2021-06-05 09:46:30 | Mark.Bell | set | recipients:
+ 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:30 | Mark.Bell | set | messageid: <1622886390.38.0.690161597618.issue28937@roundup.psfhosted.org> |
2021-06-05 09:46:30 | Mark.Bell | link | issue28937 messages |
2021-06-05 09:46:29 | Mark.Bell | create | |
|