r/Python • • Jul 25 '18

Use an IDE Me doing my CS projects.

Post image
1.2k Upvotes

213 comments sorted by

View all comments

346

u/8105 Jul 25 '18

Use a good editor/IDE. No more indentation errors.

-1

u/dadinvancouver Jul 25 '18

I find that Pycharm often has difficulty auto-intending my code correctly.

Imo, significant white space is the biggest negative about Python overall.

1

u/namesnonames Jul 25 '18

I don't usually have any problems with pycharm indentation, could you give an example? Also I think that significant whitespace is amazing. I've seen so much terribly indented code in other languages that I enjoy the piece of mind that at least there is some enforced structure.

1

u/dadinvancouver Jul 25 '18

Can’t say I’m batting very high. I’ll highlight a block of code and it often won’t indent it correctly so I end up cursing significant white space while I fix it.

1

u/chason Jul 26 '18

out of curiousity, what do you mean you "highlight a block of code and it often won't indent it correctly"? I'm trying to understand your issue since I can't recall ever having an issue with whitespace in Python.

1

u/dadinvancouver Jul 26 '18

I'm not at my development machine at the moment, but unless I misunderstand the way the auto-indent feature works in Pycharm, you must select the code you want auto-intended first.

Sometimes I'll copy and paste from one part of my application to another and so the indenting is off.

I'm anal retentive, so I always fix the indenting anyways. Sometimes you just want to see what happens with your hacked code though and worry about indenting later.

2

u/crunk Jul 26 '18

If the start and end are indented differently, then things tend to go wrong when you paste, I guess because there isn't really a correct answer there, though they could probably do better.

1

u/IReallySuckAtChess Jul 26 '18

Dude you're using it wrong. Pycharm will even fix poor indentation when pasting from another source as well as smart pasting in general. Let's not forget that reformatting the entire document to be pep8 compliant is like three key strokes or a single button in the menu.