These issues are only there because python has significant whitespace. These issues should not have been there in the first place.
Ideally, I shouldn't need to use an editor geared specifically for python code to copy-paste some python code and run it. I have had no issues with the majority of other languages when copy-pasting some code and reindenting. Only in python have I had issues with it. Even in elpy-mode in Emacs, I have had issues. Another is Jupyter/IPython, a widely used python IDE for data scientists, where this problem crops up all the time. So lay off with the superior attitude.
Don’t need a special editor, just an industry-standard one, that’s the whole point.
I was bothered by the whitespace too, for an hour one afternoon in the spring of ~2001. Then I got over it and realized what a masterstroke it was, removing ~15% of the redundant visual noise.
Firstly, if you cut and paste so often that you feel it should take precedence over everyday readability and conciseness, then that’s a dev smell. Code is read 10x as much as written, likely one reason perl declined.
Secondly, you could simply toggle view whitespace on your editor or have it replace the indent chars on the tab key. Geany does this automatically via pref and it’s Python-specific support is basic.
Thirdly, Python3 and pep8 make issues even less likely than they were. Which is approximately never in my experience in the last ten years or so.
So, this subthread could have been on slashdot in ‘98, hence the frustration.
It’s such a fucking non-issue and productivity boon. Like using yaml for config instead of json.
My point is that you should be able to code python using Notepad but it is impossible to. Yeah, when multiple people complain of the same thing and you make up more and more complicated solutions for the problem, then you know where the problem lies. Also, you smell.
When I started writing C a million years ago I thought to myself -- why the f$# does the compiler need to be told twice what the structure of my code is? Once with {} and once with indentation. It's not as if anyone half-sensible is going to write good code with bad indentation.
With that thought in mind, I am pathetically grateful for Python.
But in the majority of editors that actual people use (mainly, jupyter/ipython), they are invisible. Not to distract from my point though, which is that a good programming language should be easily editable from Notepad.
This is where your bias shows. You define this "majority of people" by looking at your niche - you must be in academia or big data. I can tell you that in my niche nobody knows what the hell jupyter even is, and they use real editors like PyCharm, emacs, vim and so on, where whitespace is never a problem.
> a good programming language should be easily editable from Notepad.
The '90s called, they want their notepad back. Please. Not even Windows users run Notepad, anybody with a minimum of knowledge will use Notepad++. And guess what, N++ has plenty of features to deal with whitespace.
Yeah, point taken about my bias. Dealing with python via jupyter has been my biggest source of frustration with python.
But there are still plenty of cases where you will come across python via a bad interface, such as a shell interface to a server that I haven't set up properly (I come across this a lot since I've a lot of code running in clusters), and new computers or other people's bad setups or computers.
Even when using elpy-mode in Emacs, I've had problems when I tried to tabify and untabify a file (to change indentation length), which completely changed program logic in multiple places, and resulted in subtle bugs that I caught much later.
Yes, if you don’t you’re incompetent. If you do, the markers are then redundant.
Mixed indentation hasn’t been allowed in years.
Any good editor will show mixed indentation, guides, and indent properly with the tab key, get one.
Sounds like your knowledge of Python is about a decade behind. Not to mention those were nonissues from my experience even back in the day.