INNER CODE UNIT · Python
__len__
mpenning/ciscoconfparse · ciscoconfparse/ccp_abc.py:124
def __len__(self):
return len(self.text)
# On BaseCfgLine()
@logger.catch(reraise=True)
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"