Odd listcomp behaviour

Emile van Sebille emile at fenx.com
Fri Dec 17 18:17:10 EST 2010


On 12/17/2010 3:08 PM Emile van Sebille said...
> Does anyone else consider this a bug?

Hmmm...  looks like it's split that I've got the issue with...

 >>> "this is a test".split()
['this', 'is', 'a', 'test']
 >>> "this is a test".split(' ')
['this', 'is', 'a', 'test']
 >>> "".split(' ')
['']
 >>> "".split()
[]


Emile




More information about the Python-list mailing list