3

If someone answers a question in a way that includes erroneous info, but contains something else -- such as code -- which does present an answer to the question*, is it right to accept that answer (assuming there are no better ones given)?

The one I'm thinking about currently is:

https://stackoverflow.com/a/36455499/5202687

Which does answer some aspects of the question, but also contains exposition which seems to be inaccurate and could be potentially misleading were it accepted.

Anyone got opinions?

*though sometimes perhaps a partial answer

12
  • 3
    Your choice really, but you might also consider creating your own correct answer when the provided answers are wrong. Apr 6, 2016 at 20:24
  • 2
    Don't accept bad answers. Deriving your own answer from an existing one is very explicitly encouraged. Just post a link to the existing one and a link to the author. Like "Building on this answer posted by @Remuse yadayada yadayada. Apr 6, 2016 at 21:18
  • 1
    Related: Whose choice is accepting an answer?
    – cat
    Apr 6, 2016 at 22:33
  • 1
    Trousers sticking together? Really? Gromit would be appalled. Apr 6, 2016 at 22:52
  • Yeah, it appears to be something to do with the way the Python I'm using functions... baffling! Apr 6, 2016 at 22:54
  • I could answer that question much better. I just wasn't here when you asked it. Now that I have answered it, you won't need to accept his; just accept mine ;)
    – zondo
    Apr 7, 2016 at 0:06
  • Hi @zondo , I tried your answer but the Python you provided is totally misinterpreted by the compiler, and ends up printing 'None' to the console. Or perhaps I meant to print 'None' the whole time and wasn't aware. Either way, is it right to accept? Apr 7, 2016 at 6:43
  • Don't accept the answer if it's wrong. My code doesn't print None, though. If you are trying to print philips_trousers.append(...), that won't work because .append() does the appending in-place and returns None. If you have put my code in a function and tried to print the returns of the function, perhaps you forgot the return philips_trousers part. I would need your code to tell you what is going wrong.
    – zondo
    Apr 7, 2016 at 10:27
  • pythonfiddle.com/python-append outputs 'None' to the console for me... Apr 7, 2016 at 11:16
  • Sorry for taking so long. I didn't notice that you commented. (An @zondo would have helped.) That code doesn't print anything. Add print philips_trousers to the end (no indentation) to make it print. Oh, and if there's anything else, ask me in the comment section on my answer. Meta doesn't seem like a good place for it.
    – zondo
    Apr 7, 2016 at 16:28
  • &#42runs code&#42 oooohhhh, snazzy! Apr 7, 2016 at 16:31
  • On a related note, what's the reserved character for asterisk on stack exchange??? Apr 7, 2016 at 16:32

0

You must log in to answer this question.

Browse other questions tagged .