Hacker News new | ask | show | jobs
by Jach 5700 days ago
I agree it's fun to read and has some good points, but it's obvious it's meant only for really imperative-styled C that you'd expect to find in the kernel. e.g.:

> ... if you need more than 3 levels of indentation, you're screwed anyway, and should fix your program.

  class A:
    def foo(self):
      while cond:
        if othercond:
          bar()
Uh oh, four indentation levels!
1 comments

Well, yes. But the style guide was written for plain C, in which the program logic starts at the first indentation in functions.

In Python you have very different characteristics, and have to adapt styles.

You should not get deeper than 3 logic indentations on function level there either, though.

And from my experience, 8 character tabs (with the article you cited actually starts with) are still workable in Python, at least for me.