[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]

Python is a joke. >IndentationError: expected an indented

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: 26
Thread images: 3

File: indent.jpg (46KB, 680x459px) Image search: [Google]
indent.jpg
46KB, 680x459px
Python is a joke.

>IndentationError: expected an indented block
>IndentationError: unexpected indented block
>IndentationError: expected an indented block
>IndentationError: unexpected indented block
>IndentationError: expected an indented block
>IndentationError: unexpected indented block
>IndentationError: expected an indented block
>IndentationError: unexpected indented block
>IndentationError: expected an indented block
>IndentationError: unexpected indented block
>IndentationError: expected an indented block
>IndentationError: unexpected indented block
>IndentationError: expected an indented block
>IndentationError: unexpected indented block
>IndentationError: expected an indented block
>IndentationError: unexpected indented block
>IndentationError: expected an indented block
>IndentationError: unexpected indented block
>IndentationError: expected an indented block
>IndentationError: unexpected indented block
>IndentationError: expected an indented block
>IndentationError: unexpected indented block
>IndentationError: expected an indented block
>IndentationError: unexpected indented block
>IndentationError: expected an indented block
>IndentationError: unexpected indented block
>IndentationError: expected an indented block
>IndentationError: unexpected indented block
>IndentationError: expected an indented block
>IndentationError: unexpected indented block
>IndentationError: expected an indented block
>IndentationError: unexpected indented block
>IndentationError: expected an indented block
>IndentationError: unexpected indented block
>IndentationError: expected an indented block
>IndentationError: unexpected indented block
>IndentationError: expected an indented block
>>
fix your code dummy
>>
>>59441922
Nope
>>
>>59441922
>write a program
>don't follow the rules/use a terrible editor
>throw a bitchfit when it doesn't work
(You)
>>
Python is fine for kiddy shit.
>>
>>59442381

cringe
>>
>proper indentation and formatting is for babbies!!!!!!!!!
>>
>>59441922
Has its flaws, but reality unfortunately is that many worse languages and libs exist.

Basically, its far from the worst. If you are doing work with computers on this level, learn to deal with it.
>>
>>59442581
And who decides what """"""proper"""""" indentation is?
>>
>>59442581
Python has programmatically significant whitespace. That IS pretty dumb when you consider source code is for human editing. We are shit at seeing and remembering whitespace.
>>
>>59441922
> Language is a joke because I'm a moron who doesn't understand indentation
>>
>>59442613
Use a text editor that shows your indentation level

And don't recursively nest your if statements 200 times and you won't have text going off the screen
>>
>>59441922
Step 1: use a text editor that isn't a complete piece of shit (ie. it understands indentation, and writes the correct number of spaces when you use tab)
Step 2: Stop blaming the language for your own failures
>>
>>59442624
> And don't recursively nest your if statements 200 times and you won't have text going off the screen

i.e. break tasks out into functions
>>
>>59442624
That it can be dealt with doesn't change that it is pretty damn dumb.
>>
File: xd.png (9KB, 302x302px) Image search: [Google]
xd.png
9KB, 302x302px
>>
>>59442676
That it can be *easily* dealt with means that it is in fact you who is dumb.
>>
>>59442595
the compiler.
>>
File: french.jpg (121KB, 1073x776px) Image search: [Google]
french.jpg
121KB, 1073x776px
>>59441922

OP isn't using tabs converted to 4 spaces, fucking pleb

>python is shit

https://github.com/networkx/networkx

>Los Alamos Natlional Labs

k
>>
>laugh at pythons indentation
>have to use curly brackets for blocks of code in C
>write C program with curly brackets
>use indentation in said C program for better readability
>>
>>59442613
Indentation is done to make things easier to read for humans even in languages where the machine would ignore it.
>>
>>59442824

This
Python code which looks right generally is right
C code which looks right is only that way for your convenience; and if you fuck up the braces but keep using certain indentation then it looks right but is wrong, which is awful.
>>
>>59442613
In languages without significant whitespace, you can improperly indent code in a way which hides your intent. It can be helpful when the language, in a certain sense, forces you to "say what you mean".

Chris Okasaki has a nice post talking about how this is particularly true for novice programmers: http://okasaki.blogspot.com/2008/02/in-praise-of-mandatory-indentation-for.html?m=1

That being said, I prefer Lisps.
>>
Python is a language for people who actually have developer jobs in the real world.
>>
>>59442877
If that was the intent, Python would feature mandatory automatic code formatter instead. But no, this is just a lazy man's way of avoiding braces. That turned out (obviously) to be stupid because it then requires need way too much editor support to reduce a slew of new possible mistakes it causes.

>>59443350
Almost the same argument here.

I do not care that some university prof might feel he gets more "readable" code, the problem is that something we are really shit at seeing now affects program correctness.
>>
>>59441922
retard, install a pep8 format engine and shut up.
you've never been through the pain fixing a missing bracket in a huge project.
Thread posts: 26
Thread images: 3


[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.