INNER CODE UNIT · Python

__hash__

mpenning/ciscoconfparse · ciscoconfparse/ccp_abc.py:129

    def __hash__(self):
        ##   I inlined the hash() argument below for speed... whenever I change
        ##   self.__eq__() I *must* change this
        return hash(str(self.linenum) + self.text)

    # On BaseCfgLine()
    @logger.catch(reraise=True)
    def __getattr__(self, attr):
        try:
            retval = getattr(object, attr)
            return retval
        except BaseException:
            error = f"The {attr} attribute does not exist"
            logger.error(error)
            raise AttributeError(error)

    # On BaseCfgLine()
    @logger.catch(reraise=True)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…