TL;DR - This isn't an acceptable edit (even knowing this works for both Python versions)
Let's talk about the moving parts here for a second. See below for a more detailed talk about this specific issue
- The question is version agnostic. It uses the generic python tag
- The answer clearly answers the question. It's accepted and decently upvoted
- Python is a bit weird in the 2.X vs 3.X split. There's two ways to do a lot of things.
Edits should not replace working code, even if the methodology is obsolete. The catch here is it removed the 2.X answer for a 3.X answer. New answers come along all the time, but this should either
- Be a comment
- Be another answer
Both are valid reasons to reject this.
I'm editing this in because there's a different sub-issue here: the edit was valid syntax in both versions. I'll use this from MisterMiyagi's post, since it's concise:
It is important that the change does not invalidate the previous answer scope: a single-argument print
is backwards compatible to Python 2.
The early voting that's happening in this Meta seems to be related to that sentiment. Another comment of his:
Yes, I expect some level of subject matter expertise from edit reviewers. Having to judge whether two versions are the technically equivalent is frequently required, not just for code changes. Knowing that print(x)
will work in both versions of Python does not seem exceptional to me.
Therein lies the problem: you can't expect that. The Suggested Edit queue is, hands down, the most clogged queue we have. There's a hard limit of 500 edits allowed to sit in there. We need reviewers, and we cannot demand that only subject matter experts (SMEs) review what they already know. That would mean you only review a handful of things. Per the FAQ entry
If changing the syntax errors or typos would result in the code doing something other than what the answer says it will, consider creating a comment or a separate answer explaining your change. If posting another answer with only that change seems like it won't provide added value to future visitors, it probably doesn't change logic or functionality and should be an edit instead.
This isn't a typo, it's simply another way to express the same thing. But adding parenthesis isn't something you just do in most languages. That's control syntax you're dealing with, and just because Python will accept it with or without parenthesis does not mean it should be approved. From the same FAQ entry (emphasis mine)
If you do not have 2,000 reputation allowing you to edit without review, you should be sure to include a good Edit Summary. Reviewers may not be an expert in the language you are submitting an edit for, and may click 'Reject' if they aren't sure if your edit meets these guidelines. Adding a good Edit Summary will help minimize the chance of them making the wrong decision.
What was the edit message here?
fixed links and print statement for python3
As someone with a lot of reviews under my belt, I see this a lot, where some new user makes a suggested edit to "fix" code (and, in cases where I am an SME, I sometimes facepalm at their "fixes"). Reviewers cannot be required to know if the suggested syntax will work and so our position is we err on the side of rejection. This just happens to be one of the rare times where the edit makes no syntactical difference.
"Adding a separate entry for the Python 3 way …" This seems quite frankly excessive to me. We're talking about a single pair of parenthesis. The syntax has no bearing at all on the actual problem of the Q&A, an answer specifically with explanations for Python3 syntax would add nothing but distraction.
A good edit here will either explain the syntax, or be a separate post (example with different syntax for the same thing).
print h
(rather thanprint(h)
), then the edit could actually be invalidating the answer.print(...)
is valid syntax in Python2 and Python3, so the change I don't think is destructive. OTOH the Python3 interpreter emits a very helpful error message if it getsprint
without parentheses, so the edit is minimally beneficial.