Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

if you care enough make a tutorial, you should care enough promote best practices, just sayin'.

I ignored pep8 for a long time, until I noticed more and more whitespace mess in diffs. Following pep just makes work easier.



Saying "best practices" makes my brain turn off. Call it 'dogma', it's more accurate because it lacks the subjective boolean people like to slip behind 'practices'.

I get it. PEP-8 is rad, and pretty well accepted... but:

1. It's a blog post. It's subjective opinion. 2. Whitespace alignment is rad, and some of the PEP-8 whitespace rules are pretty unfortunate.

I guess if it were me I'd at least have called out that the alignment violates PEP-8 as a warning to folks.. and I wouldn't have led the tutorial with it, so that I'd at least be dealing with trolls that make it through the entire post.


I did find it strange that the post didn't even address that the allignment advice was contrary to PEP 8. That being said, I definintely find

  my_data   = 3
  your_data = 2
much easier to skim than

  my_data = 3
  your_data = 2
Given that PEP 8 even says "But most importantly: know when to be inconsistent -- sometimes the style guide just doesn't apply. When in doubt, use your best judgment. Look at other examples and decide what looks best." I have no problem occasionally using more than one space for allignment.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: