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

Carl Johnson carl at carlsensei.com
Fri Dec 12 05:58:21 CET 2008


Rereading your message along with your other ones, I see that I  
misinterpreted it. I thought you meant, "I can't imagine a new  
programmer wanting something as regex-like as string.splitonchars,"  
but what you meant was "I can't imagine new programmers wanting to go  
into the re module to learn how to do something like  
string.splitonchars." To which I say: Yes! I heartily agree! :-D

Embarrassedly-yours,

Carl

> 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