this post was submitted on 28 Feb 2024
1010 points (97.0% liked)

Programmer Humor

32472 readers
949 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 77 points 8 months ago (26 children)

Python: So you used spaces and tabs for indentation? NOW DIE!

[–] [email protected] 22 points 8 months ago (3 children)

Good. Spaces and tabs for indentation should never be mixed in any language other than Whitespace.

[–] [email protected] 4 points 8 months ago* (last edited 8 months ago) (1 children)

Some people use tabs for indentation and spaces for alignment. It kind of gets the pros of tabs (user configurable indent-width) and the pros of spaces (alignment). That doesn't work in Python where you can't align stuff and the interpreter doesn't allow mixing tabs with spaces, but in other languages it is a possible style.

[–] [email protected] -1 points 8 months ago

There are no pros to tabs. Configure tabs to a number of spaces.

load more comments (1 replies)
load more comments (23 replies)