<br><br><div class="gmail_quote">On Thu, Jan 31, 2013 at 12:56 PM, Mark McLoughlin <span dir="ltr"><<a href="mailto:markmc@redhat.com" target="_blank">markmc@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Thu, 2013-01-31 at 12:32 -0800, Maru Newby wrote:<br>
> Hi all,<br>
><br>
> I'm the reviewer that prompted Zhongyue Luo to ask this question on<br>
> the mailing list, and would like to chime in.<br>
><br>
> As has been noted on this thread, not only are the two forms logically<br>
> equivalent, but they also produce the same byte code. The only reason<br>
> to mandate one over the other would be 'readability'. I would<br>
> suggest, though, that the minimal increase in so-called readability<br>
> does not justify requiring reviewers to enforce this style rule.<br>
><br>
> That is not to say that I think code consistency is without value -<br>
> quite the opposite. I subscribe to Ableson/Sussman's view that<br>
> "Programs must be written for people to read, and only incidentally<br>
> for machines to execute." I do think, however, that the effort<br>
> required to enforce a given rule should be weighed carefully against<br>
> the value that its enforcement brings. I'm not of the opinion that<br>
> manual effort is justified in this particular case. If the community<br>
> consensus is that this rule needs to be enforced, I suggest that it be<br>
> done through automatic detection (ala pep8), or even automatic<br>
> correction (ala the kinds of code reformatting tools that are<br>
> pervasive in c/c++ land).<br>
<br>
</div>How about this as a conclusion?<br>
<br>
We generally prefer "X not in Y", but few think it's a big deal.<br>
<br>
Reviewers don't need to enforce this, but they shouldn't be recommending<br>
"not X in Y" either.<br>
<br>
If anyone feels like taking on the janitorial task of removing uses of<br>
"not X in Y" from code occasionally, that's totally cool.<br>
<br>
If someone wants to write a hacking.py check for this, that's totally<br>
cool too.<br></blockquote><div><br></div><div>Although I am on the fence about adding this to HACKING.rst ... since we have it: <a href="https://review.openstack.org/#/c/20950">https://review.openstack.org/#/c/20950</a></div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers,<br>
Mark.<br>
<div><div><br>
<br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</div></div></blockquote></div><br>