[Baypiggies] padding variable assignments, why is it bad?

Duncan McGreggor oubiwann at twistedmatrix.com
Fri Aug 10 20:16:35 CEST 2012


Yeah, I have spent HOURS fixing the spacing in files that did that due to
having to add a slew of new variables. It's useless, meaningless work and
it always makes me crazy to have to do it.

d

On Fri, Aug 10, 2012 at 11:00 AM, Heikki Toivonen <hjtoi at comcast.net> wrote:

> With padding you may be required to change all of those lines when you add
> a new variable. More work, and messes around with source control system's
> ability to show who added those lines and why.
>
> Nam Nguyen <bitsink at gmail.com> wrote:
>
> >PEP 8 also says (quoted as-is, with original misspellings):
> >
> >    When in doubt, use your best judgment
> >
> >So, it's okay if you find that spaces help you in reading code. Make
> >sure to keep it consistent in the same module.
> >
> >Nam
> >
> >
> >On Fri, Aug 10, 2012 at 10:19 AM, Aleksandr Miroslav
> ><alexmiroslav at gmail.com> wrote:
> >> (Reading this email requires a monospaced font.)
> >>
> >> I do this a lot in my code:
> >>
> >>     foo          = 1
> >>     foo_bar      = 2
> >>     foo_bar_quux = 3
> >>
> >> but pep8, which I started using recently, considers this wrong, so I
> >> have to rewrite to the more common form:
> >>
> >>     foo = 1
> >>     foo_bar = 2
> >>     foo_bar_quux = 3
> >>
> >> which I think sacrifices readability. Perhaps this is the n00b in me
> >> talking, but why is this considered bad?
> >> _______________________________________________
> >> Baypiggies mailing list
> >> Baypiggies at python.org
> >> To change your subscription options or unsubscribe:
> >> http://mail.python.org/mailman/listinfo/baypiggies
> >_______________________________________________
> >Baypiggies mailing list
> >Baypiggies at python.org
> >To change your subscription options or unsubscribe:
> >http://mail.python.org/mailman/listinfo/baypiggies
>
> --
> Sent from my Android phone with K-9. Please excuse my brevity.
> _______________________________________________
> Baypiggies mailing list
> Baypiggies at python.org
> To change your subscription options or unsubscribe:
> http://mail.python.org/mailman/listinfo/baypiggies
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20120810/8be7c2a6/attachment.html>


More information about the Baypiggies mailing list