En Sun, 08 Feb 2009 17:59:41 -0200, <bearophileh...@lycos.com> escribió:

More suggestions for a real-world Python programmer:
- There's code duplication, the original poster may express reet as a
composition of the other functions.
- A Python string/list/array can be inverted with [::-1]
- I suggest to convert the examples of the main doscstring into
doctests.
- The main docstring looks too much heavy.
- To convert many ASCII chars there's the str.translate method.
- Generally I suggest to learn to code in the small, using as little
code as possible.

I completely agree with all the above suggestions, except this last one. Ok, I think I know what you mean, but a beginner might understand this completely wrong. Readability is important, and trying to compress too much code into one single line should not be the ultimate goal.

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to