def var_replace(self, text):
        """Replaces all instances of @VAR with their values in the specified text.
        """
        result = text
        for var in self._vardict:
            result = result.replace("@{}".format(var), self._vardict[var])
        return result
def var_replace ( self , text ) : result = text for var in self . _vardict : result = result . replace ( "@{}" . format ( var ) , self . _vardict [ var ] ) return result
Replaces all instances of @VAR with their values in the specified text.