The behaviour of "".split("*") is not that strange as the splitpoint
always disappear. The re.split() have a nice option to keep the
splitpoint which the str.split should have, I think.

One expectation I keep fighting within myself is that I expect

"mystring".split('') to return  ['m', 'y', 's', 't', 'r', 'i', 'n',
'g']. But I guess it's in line with "There should be one-- and
preferably only one --obvious way to do it." that it's not so.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to