Tabs vs Spaces

Which should I use? I use python and PEP 8 says to use spaces but everyone I know uses tabs (and people online)

Attached: tabs-vs-spaces.jpg (1440x679, 126K)

Bind tab to 4 spaces

FUCK PYTHONNNNNNNN

depends on what the coding standard for the project, I really don't care which

there are tools for every relevant editor to let you edit and display files in your coding style which is then implicitly converted to the project's. Personally I indent with spaces anyway because I want control over my line lengths.

Attached: ScmXJPq.png (848x480, 335K)

Only brainlets use tabs

4 spaces? what do you need 3 spaces for?
2 really is the most you should ever need for single-level indents, anything else is blasphemous

when the difference between 2 and 4 begins to matter one should consider working with subroutines anyway. I like 4 spaces as I find it less straining to look at.

Attached: 1525564367409.jpg (871x955, 192K)

>when the difference between 2 and 4 begins to matter
pretty quickly? surely you don't let you code get wider than 80 characters?

spaces for everything
func_with_lots_of_params(param1,
param2,
param3,
param4);

tabs would mess up the alignment

absolutely disgusting

func_with_args(
param_1,
param_2,
param_3,
param_4,
...
){

>Indentation

Tabs are 8 characters, and thus indentations are also 8 characters. There are heretic movements that try to make indentations 4 (or even 2!) characters deep, and that is akin to trying to define the value of PI to be 3.

Rationale: The whole idea behind indentation is to clearly define where a block of control starts and ends. Especially when you’ve been looking at your screen for 20 straight hours, you’ll find it a lot easier to see how the indentation works if you have large indentations.

Now, some people will claim that having 8-character indentations makes the code move too far to the right, and makes it hard to read on a 80-character terminal screen. The answer to that is that if you need more than 3 levels of indentation, you’re screwed anyway, and should fix your program.

In short, 8-char indents make things easier to read, and have the added benefit of warning you when you’re nesting your functions too deep. Heed that warning.

Attached: linus.faces22052.web_.jpg (1619x2024, 1.27M)

Correct, I also tend avoid more than 3-4 levels of indentation. It is rare for control logic to be not complex enough to justify encapsulation while being nontrivial to linearize, and if you frequently reach 4+ index transformations you should consider working with superindices.
I should also proofread my posts more carefully, because fucking Jow Forums won't let me post less terrible version without major changes to the original post.

>Now, some people will claim that having 8-character indentations makes the code move too far to the right, and makes it hard to read on a 80-character terminal screen.
>The answer to that is that if you need more than 3 levels of indentation, you’re screwed anyway, and should fix your program.
I agree with the latter, but don't see how it's an argument against the former. I find 8 to be off putting even on 1 layer of indentation, which is the vast majority of my code.

Attached: 1511458073570.png (429x410, 61K)

And that is why among sensible people, indentation is done with tabs, and you configure tabs to be whatever size you like in your editor. They look like 4 spaces on your machine and 8 on mine, and everyone is happy.

Tabs for *indentation*, spaces for alignment.

I don't know, I'd argue in favor of either or , but if I were told at gunpoint to use tabs myself I would do

>I don't know, I'd argue in favor of either
Why?

Tabs are for propriatary software
Spaces are for free software

Use accordingly.

because if an external tool converts your personal conventions flawlessly anyway the whole point is moot

Tabs.
Spaces are bloat.
Everyone telling you to use spaces is a retard, they use spaces so their files look bigger.

If we wanted our programs to be retardedly big we'd just use nodejs and call it a day

you should use whatever happens when you hit the tab key and let your IDE handle such trivial issues

Yet you use spaces
B L O A T

do.(this);
I lots of text editors and IDE's give this option right off, it's usually covered in the "setting up for Python instructions

Tabs are best - consistent number of characters for readability, if people don't like the spacing they can set it how they please.

I use tabs, Who the fuck cares?