Timeline for How can we avoid "overhang" code indentation?
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 3, 2020 at 15:29 | history | edited | CommunityBot |
Commonmark migration
|
|
Sep 4, 2015 at 10:35 | history | edited | Purag | CC BY-SA 3.0 |
added 315 characters in body
|
Sep 3, 2015 at 20:45 | comment | added | Purag | @Thomas Fair point! I wonder if there's a way to have more subtle warnings on the ask page. I feel like this is immensely valuable, and I feel the benefits would greatly outweigh the cost. | |
Sep 3, 2015 at 7:50 | comment | added | Thomas Orozco Staff | I'll play the devil's advocate for a little bit here. We already have a non-trivial amount of warnings that pop up left and right when someone is asking a question (tag blacklist, content blacklist, automated quality checks, etc.). I'm a little worried adding another one for something that isn't actually making the post un-usable (i.e. it's annoying, but it's easy to unambiguously spot and fix for a human) isn't necessarily a step in the right direction. Doesn't mean we shouldn't do something about it, of course — only that warnings have a cost to the user. | |
Sep 3, 2015 at 5:17 | comment | added | Henk Langeveld | Item 3, adding a prompt try improving the formatting of your included code. It could reveal the problem, deserves its own spot here. | |
Sep 3, 2015 at 5:09 | comment | added | Purag | @RFlack Yeah, it will never be mandatory to fix the code, and definitely not mandatory to automate it. Python is a hard one, but definitely parsable if need be. In C-like languages (which I imagine dominate the questions asked on SO), you can do really simple checks for whether the level a line is indented matches the one before it, except if there was an open/close bracket. That's a really simple thing to implement actually. | |
Sep 3, 2015 at 5:01 | comment | added | RFlack | The suggestion of a warning + fix/leave it choice seems good. Mandatory auto fix not so much. On a somewhat tangential point (line?), as a new comer to Python I still struggle with the concept of white space as a delimiter; at least these examples have matching braces which will assist the (mechanical) editor. | |
Sep 3, 2015 at 2:51 | history | edited | Purag | CC BY-SA 3.0 |
added 9 characters in body
|
Sep 3, 2015 at 2:45 | history | answered | Purag | CC BY-SA 3.0 |