[Python-ideas] This seems like a wart to me...

Carl Johnson carl at carlsensei.com
Sat Dec 13 21:30:17 CET 2008


Bruce Leban wrote:

> [i for i in s.split(x) if i] is simple enough if I don't know how to  
> write "(" + re.escape(x) + ")+".

The point of the dropempty keyword would be less the dropempty=True  
case as the s.split(None, dropempty=False) case, which would otherwise  
require a regexp.

-- Carl



More information about the Python-ideas mailing list