On Fri, Nov 27, 2009 at 2:03 AM, Stefan Lesicnik <ste...@lsd.co.za> wrote:
> hihi! (two in 1 day!) > > Is there a document, pep, wiki etc that defines best practice for python > code? (maybe its more generic). > > This one is fairly comprehensive: http://www.python.org/dev/peps/pep-0008/ HTH, Wayne I keep stumbling on things I think, it would be nice if someone mentioned > this. Some things ive seen > > - keep you try blocks as small as possible, so you can isolate the error > - functions should return one value (im not 100% of this one) > - declare variable names in a certain way (place?) > - use the if __name__ == '__main__': main() convention > > im sure there are tons more, that i only figure out after stumbling through > them. does anyone know if its written down, or stumbling is just part of the > learning process? > > stefan > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > -- To be considered stupid and to be told so is more painful than being called gluttonous, mendacious, violent, lascivious, lazy, cowardly: every weakness, every vice, has found its defenders, its rhetoric, its ennoblement and exaltation, but stupidity hasn’t. - Primo Levi
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor