Is there a guideline for when to edit an existing answer vs. adding a new answer with your improvements?

Questions, I don't care about editing - after all, they are requests for information.

Answers are a different story - they are representative of the answerer, so I tend towards preferring to leave what the original poster intended, even if it's not perfect.

E.G. let's say that a user used a generic instead of a specific exception (for python guys, using except: instead of except ValueError as e:). Is that small enough to just edit into the question? This one seems to be, since it's common, clear enough, and doesn't substantively change the answer.

There are other edits on the other end which are clearly over the line e.g. ones that refactor the code. Even if they are actually improvements on the original code, they aren't the answerer's code, and so should be a new answer, not an edit.

Just looking to see if there is guideline for the line between the two, to verify I'm doing the right things.

  • 4
    If the answer is already correct, I personally won't write a new/edit answer to add minor info. I usually just leave a comment to that answer instead (e.g. "It's better to use specific exception, like ..."). Feb 27, 2014 at 15:17
  • that can work, but e.g. if the above is in the middle of 20 lines of code, then a comment saying 'you should change the except to except as' is not nearly as clear as just editing and/or a new answer, especially since many (some?) people may start by copying & pasting and forget to make those edits themselves... Feb 27, 2014 at 15:20
  • I think if you really believe it was just a simple typing mistake or the like, it's OK to edit that, especially if your edits don't require approval. Perhaps also leave a comment about what you did to make it clear to everyone, in case there was something pertinent you missed when making that edit. If your edits do require review, though; that edit might be a bit too minor. But there's a little fuzz around the edges on this one. Feb 27, 2014 at 15:26
  • Maybe it's only my style, but I'll never edit someone's answer before letting the answerer knows what s/he misses. That way, the answerer, OP, and future viewers can learn from it. If after some time the answerer still doesn't edit it, then I'll incorporate the edit. Feb 27, 2014 at 15:31
  • this one doesn't completely answer my question, but is close: meta.stackexchange.com/questions/80513/… Mostly my context is in what edits to reject, not so much what edits to make myself anyways... i definitely think I agree with the sentiment that you shouldn't change another user's answer without good reason. Feb 27, 2014 at 15:35
  • 1
    imho - it's okay to "correct" an answer, but not "change" an answer: This one seems to be, since it's common, clear enough, and doesn't substantively change the answer - I disagree - it does substantively change the answer. It may be exception Exception that's intended or as you indicate a far more (and most likely) specific exception/two. If I saw a suggested edit - I would probably reject it. If it was someone I bump into and was new, I would probably leave a *cough* ValueError *cough* comment as a nudge, or someone I bump into a lot, edit it assuming they had a brain burp. Feb 27, 2014 at 15:37

2 Answers 2

  1. Many reviewers/users (including myself) on SO have a strict belief in not changing any code in any answer. The only time these types of people think it's acceptable to edit "code" is when it's just improving the formatting of how it appears, to make it more readable.

  2. If you have less than 2k reputation, then your edit has to go through a review process before the answer is actually edited. Many users will reject edit's changing code on an answer, which can in fact eventually ban you from editing any posts for x amount of time if you get enough rejected suggested edits.

  3. How would you feel if other people edited your answer? And it possibly caused you to receive downvotes, since the editor was actually wrong, and the changing of your code caused your answer not to be workable like it once was?

So what should you do?

I can only say what I think and prefer, although some people may disagree.

Just leave a comment under the answer letting them know what is wrong and what to change.

I see three possible outcomes in doing this :

  1. The answerer can then edit his answer and make the change. Everything is happy go lucky.

  2. The answerer does not change anything, but people who view that answer in the future will see your comment and now have more information at their disposal to get the help they are looking for.

  3. In the worst case scenario, your comment somehow gets deleted. Well, nothing you can do about that, so don't worry about it.

  • this is what I was thinking, and where I hope the community agrees. I agree & tend towards only editing someone else's answer in extreme circumstances, but will wait and let the community vote for a while, since i've seen conflicting advice around. Feb 27, 2014 at 16:24

I think there isn't an explicit guideline for every possible happening, but I agree that it's enough to use good sense.

The suggestion from Andrew T. seems good:

If the answer is already correct, I won't write a new answer just to add the minor info. I usually just leave a comment to that answer instead.

You may take that into consideration

You must log in to answer this question.

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