Are (or should) edits that make Python 2 code compatible with both Python 2 and Python 3 discouraged?
Note that this is different to rewriting answers to shift the focus to Python 3 (see this question) but rather making minor edits such as adding parentheses around print statements to allow the code to run on both versions of Python. Other minor changes I can think of include integer division (which changed from /
to //
) and the old backtick repr syntax.
I think this sort of edit would make old, and in many cases otherwise valid, answers helpful to new coders who find the answer at the top of Google, but for whom the answers currently don't work.