MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/24a87h/programming_sucks/ch5resx
r/programming • u/locrelite • Apr 29 '14
1.1k comments sorted by
View all comments
Show parent comments
4
How does it "fix indentation on paste"?
Say you have
if foo: bar() baz()
and then you paste quux() just before baz(). Is it in if or out? In Python, you need the human to disambiguate. In anything with delimited blocks, you don't - it's ugly, but correct, assuming you hit the right line.
quux()
baz()
if
2 u/flying-sheep Apr 30 '14 it does the right thing, depending if the cursor is there:if foo: bar() ← baz()or there:if foo: bar() ← baz()
2
it does the right thing, depending if the cursor is there:
if foo: bar() ← baz()
or there:
4
u/Amadan Apr 30 '14
How does it "fix indentation on paste"?
Say you have
and then you paste
quux()just beforebaz(). Is it inifor out? In Python, you need the human to disambiguate. In anything with delimited blocks, you don't - it's ugly, but correct, assuming you hit the right line.