Python Module: nift

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Sun Feb 8 14:59:41 EST 2009


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.

Bye,
bearophile



More information about the Python-list mailing list