-27

I suggested a few edits in a post whereby I applied the PEP 8 style guidelines to some Python code. The raison d'être of these guidelines is

One of Guido's key insights is that code is read much more often than it is written. The guidelines provided here are intended to improve the readability of code and make it consistent across the wide spectrum of Python code. As PEP 20 says, "Readability counts".

Source: https://www.python.org/dev/peps/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds

My changes have been rejected by two reviewers because

This edit does not make the post even a little bit easier to read, easier to find, more accurate or more accessible. Changes are either completely superfluous or actively harm readability.

The post in point is https://stackoverflow.com/review/suggested-edits/16518156

Now I feel I have a case to say that the suggestions have not been evaluated fairly. (The emphases above were mine, obviously).

  • Basically, the reviewers don't agree with the fact that the PEP8 style guides improve readability of Python codes. Such a stance is licit but not conform 'normal' expectations concerning Python.
  • That message had already been earmarked for some degree of hostility: The new edit rejection message for "no improvement whatsoever" sounds too hostile
  • The claims that a) the post is not even a little bit easier to read; b) the changes are completely superfluous; c) the changes actively harm readability; are baseless.
  • This sort of interventions are not unusual but are also valued by some on Stack Overflow as far as I can see from How far can I refactor the code in someone else's question? (in their wording this a state-1 edit)

Is it possible to have such rejected edits reconsidered based on a more reasoned argumentation?


Update I am pleased to add that, after some 5 months, the changes proposed have eventually been approved by the very author, in spite of 15 downvotes gained here and a (put mildly) tense debate as from below.

11
  • 19
    They are called "guides" because they are "guidelines" not because anybody is obliged to follow them. The PEP8 guide even says "Many projects have their own coding style guidelines. In the event of any conflicts, such project-specific guides take precedence for that project." Jun 30, 2017 at 12:48
  • 19
    Why is PEP8 better than, for example, Google Python Style Guide?. Forcing your preferred style on someone else work is not nice. Jun 30, 2017 at 12:50
  • 7
    I didn't review that, but very likely would have rejected a whitespace-only edit on an old post. The fact that you corrected "Hope it can help u" instead of removing it doesn't help. Remember that several other users will use their (limited per-day) reviews to look at your edits -- please make those edits substantial and worthwhile.
    – Paul Roub
    Jun 30, 2017 at 14:32
  • One can agree that the guidelines are not obligatory. However the claim that a) the post is not even a little bit easier to read b) changes are completely superfluous c) changes actively harm readability; are devoid of any base Jun 30, 2017 at 14:41
  • @EricAya I guess it's a matter of conventions and expectation (ask Guido). Certainly the PEP8 guidelines do not make Python less readable. I do see that other people may see it as superfluous and I can also figure out why, in spite of several harsh tones. As written, I consider departing from PEP8 a very licit stance, but there is no correspondence between the rationale of the rejection and the purpose of the edit. Note that I am not invoking my arbitrary personal preferences, but something that is a standard, at the very least in a mild sense. PEP = Python Enhancement Proposal after all. Jun 30, 2017 at 15:25
  • 6
    Side note: spellchecking of "thank you notes" definitely did not make the change any better. With quite pointless style change such aggressive disregard for SO recommendations on fluff can easily flip decisions from "pointless but ok" to "this person should just stop"... Jul 1, 2017 at 2:15
  • @AlexeiLevenkov Side reply: what you mention as a point of blame is a marginal intervention, not sufficient IMHO to sanction anyone with anything in the line of "this person should just stop". If you like, please trim that fluff yourself since anyone can edit a post and a peer will review your change, as you certainly are aware of. Jul 2, 2017 at 19:37
  • If you like, please trim that fluff yourself Reject & Edit is certainly a legit option but it's not required that reviewers edit the posts they're looking at. In particular, some reviewers prefer that the person suggesting the edit get a specific reject reason, which doesn't happen when Reject & Edit is chosen instead. since anyone can edit a post and a peer will review your change, as you certainly are aware of Alexei has 76K+ rep, no one is reviewing their edits.
    – BSMP
    Jul 2, 2017 at 20:39
  • @BSMP Thanks for your remark. If one likes it, he/she can do it -- if he/she doesn't he/she will not. I only proposed to implement the code-formatting guidelines of PEP 8 (Python Enhancement Proposal) and had it rejected on grounds of potential harm and superfluity. I have corrected one tiny spelling error and this seems to be deemed 'aggressive' conduct. That's my own view of the matter so far, and I realise that many feel differently. Jul 3, 2017 at 6:41
  • @XavierStuvw The way I saw it you made little attempt to improve the answer besides a few whitespace changes. You didn't make an effort to update the code inside the text with inline code blocks, you made the terrible update of the signature at the end and you claimed you applied PEP8 when you didn't even apply all of it, what about (arguably one of the most important parts) python.org/dev/peps/pep-0008/#blank-lines. On top of your fluff comment, I'm not obliged to improve your edit or even reject it and edit it myself, I don't have time to make edits that should've been made. Jul 4, 2017 at 23:40
  • @NickA The handling of white spaces is part of the PEP8 guidelines and improves readability. No objection re the fact that my modifications have been incomplete: everything is perfectible, and I'll look into your tip to improve my compliance. Every little helps is the idea. Finally, if none is obliged to do any better than he/she could/would, then the you-didn't-make-an-effort argument is void. More importantly, I welcome that someone acknowledges that style guidelines have some purpose, do not cripple the value of a code, and rather enhance it (which is the crux of this debate, in my view). Jul 12, 2017 at 8:27

1 Answer 1

27

In general, we don't edit to change code style. Code style is a matter of personal preference by the poster.
In fact, edits to code style have been used to troll people in the past, which is why some reviewers even got review-banned at the time.

The reject reason itself is a canned reason; it's harsh wording has been discussed before.

My knowledge of Python is limited, but AFAIK the PEP8 guideline was already active at the time of this answer (August 2016). In which case the OP either didn't know about the guideline, or willingly refused to use it.

The OP was active within the last 2 weeks. If the OP themselves thought the edit was good, they can still overrule the reject. If they don't, then apparently they didn't want the edit either.

11
  • 1
    Code style is not a matter of personal preference of the poster. Each language has it's own style guides. For a pro, reading code which isn't well formatted is harmful.
    – xenteros
    Jun 30, 2017 at 11:57
  • 11
    @xenteros They are called "guides" because they are "guidelines" not because anybody is obliged to follow them. The PEP8 guide even says "Many projects have their own coding style guidelines. In the event of any conflicts, such project-specific guides take precedence for that project." Jun 30, 2017 at 12:47
  • 9
    @xenteros Code style is absolutely a matter of personal preference. Sure, reading code that doesn't align with your own personal preferences may be more difficult for you to read, which is harmful to you. Likewise, you going around editing code to align with your personal preferences rather than other people's means that you're harming them by making it harder for them to read their own posts. The policy is that style decisions are up to the post author, and that editing someone else's code to align with yours isn't appropriate.
    – Servy
    Jun 30, 2017 at 14:06
  • Guidelines are there to inform personal preferences and make it a personal preference whether to follow shared rules or one's own. However, regardless of personal options, the claims that a) the post is not even a little bit easier to read b) changes are completely superfluous c) changes actively harm readability; are devoid of any base Jun 30, 2017 at 14:48
  • 5
    @XavierStuvw So you're saying that it is only your personal preferences that matter, and nobody else is allowed to differ in their own personal preferences? What makes you so special? Why shouldn't anyone else's personal preferences be taken into consideration?
    – Servy
    Jun 30, 2017 at 14:56
  • @Servy Your first question: Not quite. I mean that, once you are aware of guidelines, you choose between following the shared guidelines and your own coding style. Your second question: I don't know why you ask. Third question: I don't know why you ask. This closes our conversation if you don't mind. Jun 30, 2017 at 15:01
  • @Servy I don't read that in the comment. It seems to me XavierStuvw is more concerned with the harsh wording of the (canned) comment. Altough tbh I might be projecting there - I've long been against the harsh wording.
    – S.L. Barth
    Jun 30, 2017 at 15:03
  • 5
    @XavierStuvw So you're saying that it's okay for you to impose your own personal preferences over others, and they're not allowed to have their own preferences that differ from yours, but you don't understand why I'd ask why your preferences should be given preference over anyone else's? I'd think that the reason for the question would be obvious. You're asserting that your personal preferences matter, and that nobody else's do. I'm asking you why you feel that yours should matter and others' should be ignored.
    – Servy
    Jun 30, 2017 at 15:04
  • @S.L.Barth They edited in a statement that they don't like the wording just a few minutes ago, before then the question was merely stating that they felt that their edit shouldn't have been rejected at all, not that the wording should be changed. The answer (and my comments) are responding to the original question.
    – Servy
    Jun 30, 2017 at 15:05
  • PEP = Python Enhancement Proposal Jun 30, 2017 at 15:27
  • @S.L.Barth Thanks for your reply. I came across this meta.stackexchange.com/questions/88627/… in which refactoring for a nice display's sake is considered OK (link added to the post). This is to balance your statement "In general, we don't edit to change code style". Of course, I do understand that you may not want to change anything. But this should not give leeway to prohibiting people to even think that harmless and reasoned coding conventions are appropriate. (NB I am quite aware you are not prohibiting anything, to be sure) Jun 30, 2017 at 16:04

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