19

This >1000-voted question has a +1000-voted answer that I think is substantively incorrect and misleading. (It suggests using fileinput.input() to read from stdin. Fileinput does read from stdin, unless you provide a filename anywhere in argv. So any script that can take a file argument AND stdin will behave incorrectly. It's also unnecessarily complicated--if all you want is to read stdin, sys.stdin or input() are better options.)

In general, I know that the guideline is don't edit for factual/substance reasons and if something is highly-upvoted and incorrect, tough luck. This question is specifically about whether an answer being community-wiki changes that, and if so, how so.

From the privs helppage:

When should I edit Community Wiki posts? Community wiki posts have been donated to the community in hopes that others will edit them to keep them up to date, to add useful information, and generally improve their quality. Take us up on that offer -- whenever you see a community wiki post and have something useful to contribute, edit it!

(In this particular question's case, the original poster of the answer has been inactive for 10 yrs, so I can't ask them if they'd be willing to change it. There's a number of better answers that could potentially be incorporated, if appropriate.)

I'm unsure how best to handle this. The community wiki designation invites me to improve the answer, but it feels like there's potentially a difference between 'add useful information' and 'completely rewrite'. I also don't want to copy the other answers (and thus rob their authors of the imaginary internet points they so richly deserve), nor do I want to put a "EDIT: see this other answer instead".

Other related meta's:

2
  • 3
    Nice to see the amount of research you did. Unfortunately it does show how fragmented the documentation is. What you were missing and Ryan explained is general guidance on what is alright to do when editing answers, the fact that it is a community wiki is pretty irrelevant. The help center text is written with the assumption that you know the boundaries when it makes such sweeping statements such as "whenever you see a community wiki post and have something useful to contribute, edit it!" . And then you have to plug the gaping hole with "... following general editing guidelines".
    – Gimby
    Commented Aug 29 at 12:54
  • Perhaps you could make an addendum to the bottom of the answer? Commented Sep 3 at 12:36

1 Answer 1

35

No, edits should not change the general idea of an answer, regardless of Community Wiki status

The voting on an answer represents people's opinions on that answer. Replacing it with something else is taking hundreds of people's approval from the previous answer and giving it to a new answer that only one person has reviewed.

Generally, there's some good reason for that1. This seems like a good answer to illustrate why we shouldn't substitute a single person's judgement for everyone's, as the answer isn't actually wrong. Since the beginning, it has included exactly the caveat you specify as why it's incorrect:

fileinput will loop through all the lines in the input specified as file names given in command-line arguments, or the standard input if no arguments are provided.

For some reason, even recently (that is, using Trending sort), people seem to prefer that to the straightforward solution using sys.stdin. I don't know why (perhaps they like the option to provide a file for input as well?), but I certainly don't want to substitute my judgement for theirs, especially given that the other answer has been there for well over a decade now.

However, this doesn't mean that you can't make any caveats clear(er). If you think the answer is perhaps not calling out what it does prominently enough, perhaps because you suspect people aren't reading the text under the code block, you could, for example, prefix it with something like "To read from either stdin (if no command-line arguments are provided) or any filenames provided on the command line:".


1 I've seen exceptions, but I've seen at least as many people think they're improving a popular answer and be wrong about that.

5
  • 3
    Thanks for the advice/example of making caveats clear without changing what the answer's about! And yeah, overruling previous voters is something I don't think I mentioned in the question but was certainly part of my worry.
    – Kaia
    Commented Aug 29 at 1:33
  • 7
    I'm guessing the reason why it has the most upvotes is because people read it first since it's at the top, try it in the simplest case, see that it works and then don't bother reading any of the better answers. But that's just a guess, so I do agree that it shouldn't be edited to change its meaning, it's better to downvote it (which is free since it's community wiki). Commented Aug 29 at 12:58
  • @Ryan-M, would you consider this answer "dictating site policy", "this is what I've observed by being on the site a long time", or "my personal opinion?" If this is word-of-mods, I see no reason not to accept it as "correct answer"; if it's just your (very reasonable) opinion, then I'll let the question sit unresolved for a couple days in case somebody wants to offer their dissent. (In general, I'm not sure I know when mods are speaking ex-cathedra on Meta and when they're just regular opinionated users.)
    – Kaia
    Commented Aug 29 at 16:09
  • 3
    There's an xkcd for this.
    – Siguza
    Commented Aug 29 at 17:55
  • 2
    @Kaia Hmmm, probably closest to "what I've observed to be problematic from being on the site/handling flags" with a touch of "my opinion on how it should be". If it got downvoted to oblivion and someone posted a well-received answer disagreeing, I'd certainly reconsider whether I was wrong about it.
    – Ryan M Mod
    Commented Aug 29 at 17:59

You must log in to answer this question.

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