def get_var ( self , name ) : for var in self . vars : if var . name == name : return var else : raise ValueError
python how to get a variable's name
Returns the variable set with the given name .
def get_var(self, name):
        """ Returns the variable set with the given name.
        """
        for var in self.vars:
            if var.name == name:
                return var
        else:
            raise ValueError