469,898 Members | 1,753 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

Improvements for import this

As the capabilities of core Python have increased, I've noticed that the
logic in import this can be simplified to one line:

print s.decode("rot13")

;)

At the very least the last line:

print "".join([d.get(c, c) for c in s])

could use a generator expression instead of a list comprehension.
--
Michael Hoffman
Apr 15 '06 #1
0 692

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

23 posts views Thread by Rotem | last post: by
2 posts views Thread by Bennett Smith | last post: by
10 posts views Thread by John | last post: by
71 posts views Thread by Jack | last post: by
1 post views Thread by Frank Rizzo | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.