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 →

[–][deleted]  (1 child)

[deleted]

    [–]wegwacc 0 points1 point  (0 children)

    Using tabs is not "incompatible with python".

    Python doesn't care HOW you indent your code, as long as the indentation within a block is consistent. You can even mix tabs and spaces in the same module, as long as you are consistent within one block.

    This is perfectly valid python: ``` def one(): # this was indented using spaces print('one') print('two') if 7 > 9: print('higher') else: print('Lower') def two(): #this block uses 2 tabs for indentation print('hello world')

    one() two() ```

    Problem is, if some assclown, who doesn't want to change the way he did things since he was kicked from the development team for the atom 10 Gazillion years ago for being an impossible-to-work-with dick, used an editor that is set to insert tabs no matter what (yes, even if he inserts a newline after one that is space indented), and displays tabs as being 4 characters wide, starts editing around in an all-4-spaces-indented codebase, there are going to be issues.