[openstack-dev] "if X not in Y" vs. "if not X in Y" consensus?
zhongyue.nah at intel.com
Thu Jan 31 07:23:50 UTC 2013
Ray, we are only considering in cases when evaluation of membership is
The "if not flag" is an boolean evaluation of "flag" itself and has nothing
to do with dict.
On Thu, Jan 31, 2013 at 3:03 PM, Ray Pekowski <pekowski at gmail.com> wrote:
> 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.
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
880 Zixing Road, Zizhu Science Park, Minhang District, Shanghai, 200241,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev