Re: [libvirt] [PATCH] Test for object identity when checking for None in Python

2013-08-23 Thread Claudio Bley
At Fri, 23 Aug 2013 11:25:35 +0800, Guannan Ren wrote: On 08/22/2013 09:56 PM, Claudio Bley wrote: Consistently use is or is not to compare variables to None, because doing so is preferrable, as per PEP 8 (http://www.python.org/dev/peps/pep-0008/#programming-recommendations):

Re: [libvirt] [PATCH] Test for object identity when checking for None in Python

2013-08-22 Thread Guannan Ren
On 08/22/2013 09:56 PM, Claudio Bley wrote: Consistently use is or is not to compare variables to None, because doing so is preferrable, as per PEP 8 (http://www.python.org/dev/peps/pep-0008/#programming-recommendations): Comparisons to singletons like None should always be done with is or is