Contact: fumanchu@aminus.org

Log in as guest/dejavu to create tickets

I think I've seen this ORM somewhere before...

Changeset 399

Show
Ignore:
Timestamp:
01/22/07 23:28:39
Author:
fumanchu
Message:

UnitJoin? instances may now be compared for equality.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/units.py

    r398 r399  
    117117 
    118118class UnitJoin(object): 
     119    """A join between two Unit classes.""" 
    119120     
    120121    def __init__(self, class1, class2, leftbiased=None): 
     
    200201            raise TypeError("Joined classes must be UnitJoin or Unit subclasses.") 
    201202    __rand__ = __radd__ 
     203     
     204    def __eq__(self, other): 
     205        return (self.class1 == other.class1 and 
     206                self.class2 == other.class2 and 
     207                self.leftbiased == other.leftbiased and 
     208                self.path == other.path) 
    202209 
    203210