/script>
[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

>official python style guide >indent with 4 spaces

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 19
Thread images: 2

File: 1344464511000.png (32KB, 420x314px) Image search: [Google]
1344464511000.png
32KB, 420x314px
>official python style guide
>indent with 4 spaces instead of tab
>>
Truth hurts.
>>
If you are still using tabs in this day and age you deserve whatever hardships come to you.
>>
>>62423369
>set editor to translate a tab into 4 spaces
woah, this is a big fucking problem
>>
>>62423369
what's the problem here?
>>
>>62423416
>>62423472
>>62423557
There's literally no intelligent reason to prefer 4 spaces over tabs.
>single byte
>character semantically represents indentation
>only requires one press to add/delete even in dumb editors
>visual indentation can be customized for preference without changing code
>less chance of off by one indentation
Even Guido knew this but you spergs ruined it.
>>
>>62423597
>nobody cares about your single bytes it's 21st century go buy a bigger SSD cunt
>if you cared this much about efficiency you wouldn't be using Python in first place (I'm not saying Python is inefficient)
>tabs are problematic for their variable length fucks up indentation visually for other people in your team if their editor has different settings
>you can customize your editor to convert tabs to spaces automatically unless you stay in 80's and use some shitty console editor in which case kys
>even 80's shitty console editors can do this but kys anyways
>see now? you hit tab once and it automatically converts to four spaces so you don't need to be a cunt for others
>hit backspace once and it deletes all four of them because your editor is advanced enough to know what to do this is 21st cent cunt
>no chance of off by one indentation because your editor cares of it for you
>>
>>62423729
>tabs are problematic for their variable length fucks up indentation visually for other people in your team if their editor has different settings
If you can organize your team to use 4 spaces you can organize your team to use 4 space wide tabs in their editors.
The rest of your points are simply pointing out workarounds for the fact that spaces are less suitable than tab.
How does it feel to be a brainlet who blindly supports the current norms?
>>
>>62423369
As it should be
>>
>>62423780
How does it feel to be a edgy gaylord who blindly opposes the current norms where there's no reason to chose one over another?
>>
>>62423369
Rust does this as well. It's fucking retarded and I refuse to follow it.
>>
>>62423369
>he uses tabs
>>
>>62423729
>>tabs are problematic for their variable length fucks up indentation visually for other people in your team if their editor has different settings
That's not problematic, that's called customisation. It doesn't fuck anything up because all indentations everywhere will adjust to the setting. Nothing is broken if someone has tabs displayed as 8 spaces or 2 spaces or something. It still works fine and it's still readable. It's just a preference and they can set it how they want.
>>
File: 1503865772670.png (206KB, 800x800px) Image search: [Google]
1503865772670.png
206KB, 800x800px
>>62423597
This. Glad to see there's at least one intelligent person here.
>>
>>62423926
>blindly opposes the current norms
See >>62423597
Or let's see what Guido thought
>My recommendation is to always use tabs on the Mac -- then it will
look good on the Mac and at least parse correctly everywhere.
>For the same reason I recommend always using tabs on Unix as well (thus indenting by 8 positions there), but the majority of Python users seem to be against me.
> the majority of Python users seem to be against me.
AKA the mouth breathing masses AKA YOU.

>>62424086
If someone uses some bizzare tab size that's their prerogative and their problem.
How could tab size even fuck up inline comments?
>>
>>62424102
>have couple lines aligned in columns using tabs for readability
>send it to someone with different settings
>all fucked up
>>
>>62424102
There's no reason you can't have 4 character wide tab be the standard.
Besides your autisticly aligned method parameters won't suddenly be unreadable because they're a couple characters off from the method's opening paren.
>>
>>62423369
Because not all word processors and IDEs use the same distance for a tab, retard, it's so you have visual conformity on every platform. Jesus Christ you people
>>
>>62424130
Within a team it's trivial to set a standard tab size.
For an open source project it's trivial to mention the preferred tab size, I could then download it and if I so desired change my setting for that project and see it as you wished. Or I could ignore it and use my own preference, god forbid I do change how the code appears in my own fucking editor.

Instead of newlines let's use 20 spaces just in case someone's editor has a different line height.
Thread posts: 19
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.