We need PIGs :)

Daniel Larsson daniel.j.larsson at gmail.com
Sun Sep 16 10:47:13 EDT 2007


On 9/16/07, Colin J. Williams <cjw at sympatico.ca> wrote:
>
> Marc 'BlackJack' Rintsch wrote:
> > On Thu, 06 Sep 2007 09:00:02 +0200, Stefan Arentz wrote:
> >
> >> What I find really frustrating in Python (combined with usually bad
> >> documentation) is that many people have different styles. The most
> >> frustratinng being getFoo() vs .foo, vs get_foo().
> >
> > `getFoo()` is discouraged by PEP 8.  You don't have the choice between
> > `.foo` and `.get_foo()` in Java because Java has no properties and
> people
> > are trained to write getters and setters for everything.  I like that
> > choice in Python because I can write shorter code that is not cluttered
> > with very simple getters and setters.
> >
> > Ciao,
> >       Marc 'BlackJack' Rintsch
> Perhaps PEP 8 needs rethinking.  I prefer getFoo().
> Similarly, I feel that the standard indent of 4 increases the
> likelihood of running off the end of a line.  An indent of 1 isn't
> quite clear visually, but 2 is.


The point with a style guide is not to cater for everyones preferences, but
to set a common compromise.

If you find yourself going off the right margin a lot, perhaps you should
consider restructuring and refactoring your application, rather than
reducing your indentation.

Colin W.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070916/70f0bdd9/attachment.html>


More information about the Python-list mailing list