<div dir="ltr">Hi,<div><br></div><div>IMO if you want to do the stylistic changes - make the hacking rule for it first. Not all of this particular changes are useful and even correct. The explicit comparison with zero in Python where we have number of implicit casts to bool is much better in such cases.</div><div><br></div><div>Thanks.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 12, 2016 at 5:02 PM, Chris Dent <span dir="ltr"><<a href="mailto:cdent+os@anticdent.org" target="_blank">cdent+os@anticdent.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, 12 Jan 2016, Amrith Kumar wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
if var > 0:<br>
        ... something ...<br>
<br>
To<br>
<br>
if var:<br>
        ... something ...<br>
</blockquote>
<br></span>
I may be missing something but the above is not a stylistic change<br>
if var can ever be negative. In one of the ceilometer changes[1] for<br>
example, this change will change the flow of the code. In this<br>
particular example if some caller do _do_test_iter_images sends<br>
page_size=-1 bad things will happen. Since it is test code the scope<br>
of the damage is limited, but I prefer the more explicit > 0.<br>
<br>
I've not checked all the reviews but if it is showing up in one<br>
place seems like it could in others.<br>
<br>
[1] <a href="https://review.openstack.org/#/c/266211/1/ceilometer/tests/unit/image/test_glance.py" rel="noreferrer" target="_blank">https://review.openstack.org/#/c/266211/1/ceilometer/tests/unit/image/test_glance.py</a><span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Chris Dent               (╯°□°)╯︵┻━┻            <a href="http://anticdent.org/" rel="noreferrer" target="_blank">http://anticdent.org/</a><br>
freenode: cdent                                         tw: @anticdent</font></span><br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Sincerely yours,<br>Sergey Lukjanov<br>Sahara Technical Lead<br>(OpenStack Data Processing)<br>Principal Software Engineer<br>Mirantis Inc.</div>
</div>