[Baypiggies] Code/Idea Review (WARNING: SPOILER)
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
I've found it helpful to automatically check PEP8 compliance w/
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
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 (
covers python style and common idioms. Lots of good stuff in there...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Baypiggies