Message395159
| 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: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 |
|