[omaha] Fwd: [odynug] Perl Best Practices but for Python
shawnhermans at gmail.com
Fri Aug 19 23:46:27 CEST 2011
Wasn't this post looking for a RTFM response? If I understanding correctly,
you were looking to find TFM (or in this case TFB). So, my answer still
stands. Start with PEP 8 first. Once you have learned that, there are a lot
of other really good resources out there. It all depends on whether you are
looking or general code maintainability practices or Python specific.
If you are looking for code maintainability, I always suggest
documenting,documenting and documenting. I read my own code a day latter and
I still can't figure it out. For documentation, I would suggest Sphinx
and/or Epydocs. The last suggestion I can give you is make good unit tests.
Basically, lets you know right away if you broke something. For that, I
again recommend you check out the PyCon videos. In particular the one
on continuous integration (
On Fri, Aug 19, 2011 at 4:27 PM, Jeff Hinrichs <jeffh at delasco.com> wrote:
> On Fri, Aug 19, 2011 at 4:17 PM, Matthew Nuzum <newz at bearfruit.org> wrote:
> > On Fri, Aug 19, 2011 at 12:37 PM, Jeff Hinrichs <jeffh at delasco.com>
> > > On Fri, Aug 19, 2011 at 12:21 PM, Matthew Nuzum <newz at bearfruit.org>
> > > wrote:
> > > >
> > > > -1 for the -1 ;)
> > > The question asked for a book, so online references are a valid reply.
> > >
> > >
> > Forgive me Jeff, I actually wasn't criticizing you link to idiomatic. I
> > meant to reply to the first message in the thread. Yours was good. I was
> > referring to the reference to PEP-8. Your link is good and I suggest it
> > read.
> No worries, I was having a bit of fun ;)
> > I have to admit, I have a love hate relationship with PEP-8 and feel that
> > lot of people fit into the "foolish consistency" side of things. That's
> > I mentioned to follow the spirit of pep-8.
> Agreed, often when working on legacy code or even your own code started
> before you became more pep8'ish, I think it is better to follow the
> convention of the code/document than to switch back and forth. I try to
> push myself to be better at following pep8 as I go, however, like many
> others, I don't have the luxury of time to go back and correct previous
> badness, unless its a bug.
> Of course that is true with all code. For example, my first django code
> was/is ugly and the more I learn django and the proper places and idioms to
> use the better my code becomes. As a programmer, I believe I should always
> try and improve myself, and that means better looking code that is easier
> read and test. Just like Python itself, Django has outstanding resources
> the web, written both by the projects and by other users. I often stand
> awe at their contributions.
> > --
> > Matthew Nuzum
> > newz2000 on freenode, skype, linkedin and twitter
> > ♫ You're never fully dressed without a smile! ♫
> > _______________________________________________
> > Omaha Python Users Group mailing list
> > Omaha at python.org
> > http://mail.python.org/mailman/listinfo/omaha
> > http://www.OmahaPython.org
> Omaha Python Users Group mailing list
> Omaha at python.org
More information about the Omaha