rot13 in a more Pythonic style?

Martin P. Hellwig mhellwig at xs4all.nl
Wed Feb 14 18:40:36 EST 2007


bearophileHUGS at lycos.com wrote:
> Martin P. Hellwig
>> for me (personal) being Pythonic means that I should
>> separate the logic and variables, etc...
> 
> Well, for me me Pythonic means using built-in functionalities as much
> as possible (like using encode("rot13") or translate), and to write
> less code, (avoiding overgeneralizations from the start too). It means
> other things too.
> 
> Bye,
> bearophile
> 
Yup, but I have a sever case of "NIH" especially if the question asked 
is something more general then the example given :-)
However you are very much right, I reimplemented rot13 and translate in 
a dull way here :-)

-- 
mph



More information about the Python-list mailing list