[Baypiggies] Code/Idea Review (WARNING: SPOILER)

Simeon Franklin simeonf at gmail.com
Sun Dec 16 06:56:44 CET 2007

> I would like it, if you don't mind, if you gave me a thorough peer
> review for such a small piece of code. I want to know anytime I break
> convention with PEP-8. Also, if I received replies like "crap code,
> dude." that, unfortunately is not helpful. What would be helpful if I
> heard *why* it was crap so I could learn from it. The same is true
> for "cool code." That doesn't tell me what my weaknesses or strengths
> are.

Glenn -
I've found it helpful to automatically check PEP8 compliance w/
PEP8.py(download from
Especially when my code is going to be public (like patches to Open source
projects) I try to be strict about running all my python code through an
automated checker. Occasionally it saves me from really dumb errors like
trailing semicolons (I work daily with PHP and Javascript as well as Python;
old habits are hard to break).

That said - it seems to me your maybe looking not just for style guidelines
like trailing whitespace and length of lines but also whether your code is
"Pythonic". Some of this is just being aware of the batteries included
nature of Python (which is still amazing me: I didn't know about the
strings.lowercase() method till just now!) Along those however lines I
highly recommend reading "Python in a Nutshell" and the "Python Cookbook"
and online I've really liked Code Like a Pythonista (
http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html) which
covers python style and common idioms. Lots of good stuff in there...

Simeon Franklin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/baypiggies/attachments/20071215/9563942c/attachment.htm 

More information about the Baypiggies mailing list