3
\$\begingroup\$

I recently answered a Python review question. Unfortunately, I had missed that the question was for MicroPython; a subset of Python with reduced features. As a result, 1/2 to 2/3 of my suggestions are irrelevant to the OP because they involve features that aren't available to them. I'm wondering now what I should do with my answer. If someone familiar with Python viewed the question, my suggestions may be helpful to them, as it isn't obvious that the OP is using a subset of the language.

I know on Stack Overflow, answers are intended primarily for future users, and it isn't unheard of for some answers on a question to be geared toward possible variations of the OP's question to help more people. I also know though that Code Review is different, and the OP seems to be much more the focus; although not exclusively.

Should I:

  • Leave the answer as-is.

  • Remove the parts irrelevant to the OP/segregate out the parts relevant to them.

  • Delete my answer since the majority of the question isn't relevant to the OP.

Any guidance here would be appreciated. This isn't something I've had happen to an answer of mine before.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ (Comment cause this isn't an answer) If I were you I would delete the post / half or two thirds that aren't related to MicoPython. As a non-diamond moderator I would also treat it like any other answer in another language. (potentially comment & downvote) \$\endgroup\$
    – Peilonrayz Mod
    Commented Aug 24, 2020 at 7:51

1 Answer 1

0
\$\begingroup\$

(previously posted as a hasty comment)

I wouldn't think there is anything wrong with that, especially if the answer makes it clear how it deviates from OP's constraints.

Sometimes a reviewer that is more at ease in another language might use that language (or even pseudo-code) to make an algorithmic point, and there's nothing wrong with revisiting old C# posts and noting new language opportunities in more recent versions of the language. Point is, the real value is the takeaway from what the code is showing, not the code itself - the code in a review answer is (should be?) illustrative, reinforcing the points made in the actual body of the post with regards to the OP's code.

If the post is well-received, leave it; if it's more of an alternative implementation that doesn't really review the OP, it's probably best edited into an actual review, ...or removed.

\$\endgroup\$
1
  • \$\begingroup\$ Whilst I agree with your answer when it comes to say algorithm changes or general Big-O comments. When you get into nitty gritty details it starts to make less sense. If I went around every C question saying to prefix privates with an underscore I could possibly not only be unhelpful but also cause problems. Additionally MicroPython isn't like an old version of Python it has some pretty severe breaking changes with Python, like the classes seem foobar. Maybe Python 1 worked that way, but I don't think even old-style classes did. \$\endgroup\$
    – Peilonrayz Mod
    Commented Aug 28, 2020 at 22:50

You must log in to answer this question.

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