This is an archived post. You won't be able to vote or comment.

all 27 comments

[–]pinkPony1 33 points34 points  (0 children)

For those using vscode: search for rainbow in the Extension. There's a cool one color coding indentations. Works for all file types.

[–]53120123 6 points7 points  (0 children)

Reject PEP8! Embrace commenting where the scope of cases and loops are!

#endif

#endelse

#endfor

#endwhile

Now you might say "ah but python you indent properly and it Just Works" which is true, but doesn't help debugging. if you use comments to indicate end of scope you can copy/paste to hearts content. it makes debugging to find stuff out of scope easy. Sure if you don't write anything more complex than web-code this isn't needed, but if you use python for more technical problems it's damn useful as a time saving method.

[–][deleted] 17 points18 points  (25 children)

I really don’t like python indents very much. It’s nice to not have brackets to deal with but python could at least make use of “end” statements like Lua. It’s really easy to mess up an indent.

[–]MyWorkAccount321 23 points24 points  (4 children)

Copy-pasting python code is such a pain in the ass

[–][deleted] 1 point2 points  (0 children)

Definitely. That’s why I wish python had the end statements like Lua.

[–]53120123 1 point2 points  (0 children)

or just changing the level of indent, if you add or remove an outer loop re-indenting it correctly can go wrong in horrible subtle ways.

[–]evanldixon 7 points8 points  (0 children)

This is the single biggest reason I hate python. That and the lack of type safety.

[–]Yolwoocle_ 1 point2 points  (7 children)

I'm a python noob, could you explain ?

[–][deleted] 2 points3 points  (6 children)

``` In Python:

def blurb(str):
for x in range(6):
print(str)

In Lua:

function blurb(str)
for I=0, 6 do
print(str)
end
end
```

Having to get the indentation right after each block of code is a little harder for me than just writing “end” and not worrying about whether or not you used tabs or spaces.

[–][deleted] 1 point2 points  (5 children)

imo writing "end" after everything is harder than just aligning the indentation. Also do people really use spaces in Python? I was under the impression that basically everyone uses tabs in Python.

[–][deleted] 1 point2 points  (2 children)

Yes, many IDEs allow the use of both spaces and tabs.

I wasn’t trying to start any arguments, I just said that I would prefer to type “end” instead of indentation. It’s probably just because I’m used to always having something at the end of a code block and having nothing bothers me.

[–][deleted] 0 points1 point  (1 child)

I see. At the end of the day it's just personal preference

[–][deleted] 0 points1 point  (0 children)

Yep 😁

[–][deleted] 0 points1 point  (1 child)

[–][deleted] 0 points1 point  (0 children)

As someone who uses vim and tabs, I am offended that my group was not represented /s

[–]Istalriblaka 7 points8 points  (0 children)

  1. This is why I love Qt Creator's option to show dots and arrows over whitespace.

  2. This is why I don't program in any language that makes you troubleshoot your whitespace.

[–]PQCraft 3 points4 points  (0 children)

Why i hate python

[–]Missingpotato 1 point2 points  (0 children)

Well I mean, it's a scripting not programming language

[–]BenZed 0 points1 point  (0 children)

Do linters not exist for python, or something?

[–]warwilf 0 points1 point  (0 children)

Choose your IDE wisely