https://issues.apache.org/ooo/show_bug.cgi?id=124953

          Issue ID: 124953
        Issue Type: DEFECT
           Summary: [PyUNO] Add __ne__ method to UNO types
           Product: App Dev
           Version: 4.1.0
          Hardware: All
                OS: All
            Status: CONFIRMED
          Severity: normal
          Priority: P3
         Component: scripting
          Assignee: [email protected]
          Reporter: [email protected]

If user defined class does not have __eq__ method, (a == b) is identification
check of these instances.
If __eq__ is defined, the customized identical comparizon can be done. If
__ne__ 
method is not defined in the same class, (a != b) comparizon is still identical
comparizon of the instances. 

uno.Enum is used to describe one of enum constants from UNO. So Enum.__eq__
method 
is returns True if typename and value are the same. But Enum.__ne__ is not
defined 
and so, the result of the comparizon with an value instantiated other place by
!= operator returns True. 
Because these are not the same instance.

uno.Enum, Type, Char, ByteSequence classes have to have __ne__ method. 
And also _uno_struct__eq__ method for UNO struct should be defined.

-- 
You are receiving this mail because:
You are the assignee for the issue.
You are watching all issue changes.

Reply via email to