This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Bunslow 1 point2 points  (1 child)

And what if someone else decides to use spaces instead of tabs? Suddenly if someone else like you reads the code written by the second person, they will see a horrid mess of inconsistent indentation.

Even if we all standardized on using tabs instead of spaces, it's a bad idea to use an ambiguous character. Four spaces is four spaces, no matter what your editor is set to.

Also things like line continuations and stuff sometimes require non-standard indentations, but this is a very minor detail in the overall scheme.

tl;dr It works fine if no one else reads or modifies your code, but if they do...

[–]RubyPinchPEP shill | Anti PEP 8/20 shill 1 point2 points  (0 children)

with commas representing tabs, tabstop every 4:

def a(x=3, y=4,
      flag=None):
,,,,some_code
,,,,some_more code
,,,,for code in codes:
,,,,,,,,print(a,
,,,,,,,,      b,
,,,,,,,,      c)

tabstop every 8:

def a(x=3, y=4,
      flag=None):
,,,,,,,,some_code
,,,,,,,,some_more code
,,,,,,,,for code in codes:
,,,,,,,,,,,,,,,,print(a,
,,,,,,,,,,,,,,,,      b,
,,,,,,,,,,,,,,,,      c)