2

When I review answers on Stack Overflow, I sometimes find myself polishing their formatting a tad if the answers are badly formatted, but otherwise correct, especially when it comes to new users.

That's why I made this suggestion.

As you can see, I did not add nor remove any words nor did any other changes other than reformat the code to use consistent spacing, added the required Python indentation and removed excessive Markdown in a sentence, summing up the edit as "formatting".

I would never imagine someone could consider this an edit too drastic yet two people rejected it. What did I do wrong?

0

1 Answer 1

6

Your edit is probably fine, but one thing to note is that you made extensive changes in the presented code, and in the process you fixed the code's indentation.

Python being python, that is a change that could alter the "intent" of the author. Not saying that is was, but that suggested edits that alter code need to be mindful of these things, as well as reviewers.

Still, your edit happening on an answer... fixing the indentation was probably the right thing to do, in my opinion.

Going beyond that, do try to use more descriptive edit comments.

What you did with that piece of code went beyond "formatting", since indentation is significant in python. If you are fixing something, take the time to describe it properly so the reviewers know what were you on about.

One word summaries are not useful to anyone, and on suggested edits that modify a post's code it is particularly important to be as descriptive as possible.

In this case, were I to suggest such an edit, I'd write something along the lines of:

"Fixed code indentation. Code was functionally ok but indentation was probably mangled on pasting, which made the code impossible to execute. Also removed unnecessary formatting in the last paragraph."

Now a reviewer can read the suggested edit description and find the corresponding changes in the edit. No need for the reviewer to second-guess you, and more likely to be approved if it's a good edit.

3
  • I understand. I'll try to leave more descriptive descriptions in the suggested edits. Thank you for your help :D
    – sjaustirni
    Jun 30, 2018 at 10:12
  • This answer makes no sense. The answer before and after the edit is syntactically the same, just with PEP compliant spacing. The author caught the edit and applied it anyways.
    – Braiam
    Jun 30, 2018 at 18:21
  • An edit summary that long will be cut off. IIRC the limit is 70 characters.
    – Laurel
    Jun 30, 2018 at 18:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .