4 ms·
That's cute but I hope no one reading this thinks you are being serious. If they do, to wit: So many webforums strip leading indents from code. It's not like
by rabidrat 8y ago
That's cute but I hope no one reading this thinks you are being serious. If they do, to wit:
So many webforums strip leading indents from code. It's not like it looks right on the forum, and then gets inserted into your editor wrong. It's often not right on the source side either. So if you're trying to learn an algorithm from the Python code, you're SOL. This has happened to me.
- gerdesj 8y agoIt isn't cute at all and I am quite serious. It is an accident that Python syntax pitted against sufficiently unsophisticated code displayers causes copy n paste breakage. However, that breakage does mean that you have to at least read the code a bit. You either get to avoid a potential security flaw or gain a deeper understanding of an algorithm. Fixing syntax does not break your ability to learn an algorithm but it will get you closer to its description. With Python you are generally SIL not SOL.
- Retra 8y agoYou're not SOL. You just have to retype or reformat the code. Given that you're trying to learn, you should have started with that step anyhow. I've been writing Python for years and never had this problem.
- deleted 8y ago[deleted]
- thedirt0115 8y agoI find this hard to believe. Searching for python copy paste indentation, the first page of results has everything from how to turn it on for various editors to how to turn it OFF for various editors (implying it's built-in to some). If you just gave up 5 seconds after pasting because it didn't look right or work immediately and you didn't even try looking for help... I dunno what to say.
- bsg75 8y agoI would suggest this is more of a forum software problem than a Python problem. Stripping indentation damages the readability of code in any language.