hwt/serializer/generic/constCache.py
def getConstName(self, val):
        """
        Get constant name for value
        name of constant is reused if same value was used before
        """
        try:
            return self._cache[val]
        except KeyError:
            if isinstance(val.val, int):
                name = "const_%d_" % val.val
            else:
                name = "const_"

            c = self.nameCheckFn(name, val)
            self._cache[val] = c
            return c
def getConstName(self, val):
        """
        Get constant name for value
        name of constant is reused if same value was used before
        """
        try:
            return self._cache[val]
        except KeyError:
            if isinstance(val.val, int):
                name = "const_%d_" % val.val
            else:
                name = "const_"

            c = self.nameCheckFn(name, val)
            self._cache[val] = c
            return c
Get constant name for value
        name of constant is reused if same value was used before