(self, binding)
return self.get()
Set the given binding as the active one.
        
        Arguments:
          * binding: the current binding.
Set the given binding as the active one.
        
        Arguments:
          * binding: the current binding.
Set the given binding as the active one . Arguments : * binding : the current binding .
def set(self, binding):
        """Set the given binding as the active one.
        
        Arguments:
          * binding: the current binding.
          
        """
        if not isinstance(binding, Bindings):
            # here, we assume that binding is a class, so we take the first
            # existing binding that is an instance of this class
            binding = [b for b in self.bindings if isinstance(b, binding)][0]
        self.add(binding)
        self.index = self.bindings.index(binding)
        return self.get()
def set ( self , binding ) : if not isinstance ( binding , Bindings ) : # here, we assume that binding is a class, so we take the first # existing binding that is an instance of this class binding = [ b for b in self . bindings if isinstance ( b , binding ) ] [ 0 ] self . add ( binding ) self . index = self . bindings . index ( binding ) return self . get ( )