rot13 in a more Pythonic style?
Paul Rubin
http
Wed Feb 14 16:59:15 EST 2007
"Andy Dingley" <dingbat at codesmiths.com> writes:
> I'm trying to write rot13, but to do it in a better and more Pythonic
> style than I'm currrently using. What would you reckon to the
> following pretty ugly thing? How would you improve it? In
> particular, I don't like the way a three-way selection is done by
> nesting two binary selections. Also I dislike stating the same
> algorithm twice, but can't see how to parameterise them neatly.
I'm having a hard time understanding what you're getting at. Why
don't you describe the actual problem instead of the rot13 analogy.
More information about the Python-list
mailing list