[openstack-dev] "if X not in Y" vs. "if not X in Y" consensus?

Ray Pekowski pekowski at gmail.com
Thu Jan 31 07:03:30 UTC 2013


On Wed, Jan 30, 2013 at 11:36 PM, Zhongyue Luo <zhongyue.nah at intel.com>wrote:

> What I'm suggesting is that we should add an entry in HACKING.rst stating
> we should use "if X not in Y" and prevent mix use of the two.
>

-1, This just seems like silliness.  I suppose you would disallow this too:

flag = key in dict
if not flag:

If there some performance or correctness reason, then I'd go with it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130131/131647da/attachment.html>


More information about the OpenStack-dev mailing list