Next / Previous / Contents / Shipman's homepage

9.4. FoDim.__sub__(): Subtract dimensions

We emulate subtraction by adding the negative of the second value.

fohelpers.py
# - - -   F o D i m . _ _ s u b _ _

    def __sub__(self, other):
        '''Subtract two dimensions
        '''
        #-- 1 --
        negOther = -other

        #-- 2 --
        return self + negOther