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

Carl Johnson carl at carlsensei.com
Fri Dec 12 05:46:04 CET 2008


Ron Adam wrote:
> These examples was just what a "new" programmer might attempt. I  
> have a feeling that most new programmers do not attempt regular  
> expressions ie.. the re module, until sometime after they have  
> learned the basics of python.

Feel what you like, but I assumed that .split meant .splitonchars when  
I was learning Python in 2007 and was confused when my script didn't  
work. I was also confused about why it stopped getting rid of empty  
strings. And I still don't know how to write regexs, so now I when I  
want to split on multiple chars, I end up .replace-ing a bunch first,  
which I recognize to be terribly inefficient, but the scripts are  
throwaways, so it's hardly worth the time to learn a whole other  
language first.

-- Carl



More information about the Python-ideas mailing list