Mark Bell <mark00b...@googlemail.com> added the comment:

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?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue28937>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to