Ignore:
Timestamp:
8 Jan 2015, 10:27:06 (10 years ago)
Author:
Henrik Bettermann
Message:

Do not compare ResultEntry? objects but their attribtes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/schoolgrades.py

    r9055 r12418  
    4242            self.grade = grade
    4343        return
     44
     45    def __eq__(self, obj):
     46        default = object()
     47        result = []
     48        for name in ('subject', 'grade',):
     49            result.append(
     50                getattr(self, name) == getattr(obj, name, default))
     51        return False not in result
    4452
    4553    def to_string(self):
Note: See TracChangeset for help on using the changeset viewer.