parameters: (self)
return_statement: return newset
docstring: Inverse of set as a new set.
docstring_summary: Inverse of set as a new set.
docstring_tokens: Inverse of set as a new set .
function: def inverse(self):
          """Inverse of set as a new set."""
  
          newset = self.__class__.__new__(self.__class__)
          newset._min = self._min
          newset._max = self._max
          newset._ranges = []
          laststop = self._min
          for r in self._ranges:
              if laststop < r[0]:
                  newset._ranges.append((laststop,r[0]))
                  laststop = r[1]
          if laststop < self._max:
              newset._ranges.append((laststop,self._max))
          return newset
function_tokens: def inverse ( self ) : newset = self . __class__ . __new__ ( self . __class__ ) newset . _min = self . _min newset . _max = self . _max newset . _ranges = [ ] laststop = self . _min for r in self . _ranges : if laststop < r [ 0 ] : newset . _ranges . append ( ( laststop , r [ 0 ] ) ) laststop = r [ 1 ] if laststop < self . _max : newset . _ranges . append ( ( laststop , self . _max ) ) return newset