Within an IronPython script, I'm trying to compare the property (of type Grade) of an object (created in C#) with one of the possible values of the Grade enum. So for example:
if (myObject.TotalGrade == Grade.Fail):
Now, I have set a breakpoint after obtaining both of these values, and I can indeed verify that both of them hold a 'Fail'; however, the check fails and the program moves on to the next clause. Is the python equality operator not suitable for C# enums?
Additional info: I have imported the Grade enum from my C# as shown below.
import clr
clr.AddReferenceToFile("mydll.dll")
from mydll import Grade
myObject.TotalGrade.value__ == Grade.Fail.value__. - Cameron