A rather unpythonic way of doing things

Simon Brunning simon.brunning at gmail.com
Thu Sep 29 11:34:37 EDT 2005


On 9/29/05, Fredrik Lundh <fredrik at pythonware.com> wrote:
> "fraca7" wrote:
>
> > print ''.join(map(lambda x: chr((((ord(x) - ord('a')) + 13) % 26) + ord('a')), 'yvfc'))
>
> that's spelled
>
>     print "yvfc".decode("rot-13")
>
> or, if you prefer,
>
>     print "yvfc".encode("rot-13")
>
> , in contemporary python.

I'm not sure that being more comprehensible is considered a virtue in
this thread, /F. ;-)

--
Cheers,
Simon B,
simon at brunningonline.net,
http://www.brunningonline.net/simon/blog/



More information about the Python-list mailing list