string.replace non-ascii characters

Gabriel Genellina gagsl-py at yahoo.com.ar
Mon Feb 12 01:01:56 EST 2007


En Mon, 12 Feb 2007 02:38:29 -0300, Samuel Karl Peterson  
<skpeterson at nospam.please.ucdavis.edu> escribió:

Sorry to steal the thread! This is only related to your signature:

> "if programmers were paid to remove code instead of adding it,
> software would be much better" -- unknown

I just did that last week. Around 250 useless lines removed from a 1000  
lines module. I think the original coder didn't read the tutorial past the  
dictionary examples: *all* functions returned a dictionary or list of  
dictionaries! Of course using different names for the same thing here and  
there, ugh... I just throw in a few classes and containers, removed all  
the nonsensical packing/unpacking of data going back and forth, for a net  
decrease of 25% in size (and a great increase in robustness,  
maintainability, etc).
If I were paid for the number of lines *written* that would not be a great  
deal :)

-- 
Gabriel Genellina




More information about the Python-list mailing list