Pretty succinct explanation over here which covers it nicely. Mainly one is just actual equality versus class/instance identity. Try not to use is not for things where you're trying to compare direct values. http://stackoverflow.com/questions/2209755/python-operation-vs-is-not
On Monday, July 25, 2016 at 12:45:38 PM UTC-4, likage wrote: > > I am wondering if anyone can tell me when it is best to use *is* or *is > not* over *==* or *!=* > > I have this line of code: > if (rx != None) and (ry != None) and (rz != None): > > and I am told that it will be better to write it this way instead: > if (rx is not None) and (ry is not None) and (rz is not None): > > Both method will gives the same result not? > But why *is/is not *preferred over *!=/==?* > > > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/c2d7ec32-f752-405d-b8c2-8ad3205dff29%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
