Bug or feature? 'abc'.split('') rejects empty separator

Mark McEahern marklists at mceahern.com
Sun Feb 10 18:02:30 EST 2002


[Neil Schemenauer]
> > Wouldn't it make sense to return list('abc') ?
> 
> It would also make sense to return ['a', 'b', 'c'].  Since it's not
> obvious what you want Python raises an error.

That's what that is:

	>>> list('abc')
	['a', 'b', 'c']

// mark




More information about the Python-list mailing list