def add_const(self, const):
    '\n        Add a constant to the environment, return its index.\n        '
    if isinstance(const, str):
        const = utils.intern(const)
    for (index, val) in enumerate(self.env.consts):
        if (val is const):
            break
    else:
        index = len(self.env.consts)
        self.env.consts.append(const)
    return index
Add a constant to the environment, return its index.
def add_const(self, const):
    '\n        \n        '
    if isinstance(const, str):
        const = utils.intern(const)
    for (index, val) in enumerate(self.env.consts):
        if (val is const):
            break
    else:
        index = len(self.env.consts)
        self.env.consts.append(const)
    return index