Skip to content

Commit

Permalink
Add a __len__() attribute to BaseCfgLine()
Browse files Browse the repository at this point in the history
  • Loading branch information
mpenning committed Nov 2, 2023
1 parent daf9cb3 commit 7f76e22
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ciscoconfparse/ccp_abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ def __repr__(self):
def __str__(self):
return self.__repr__()

def __len__(self):
return len(self.text)

# On BaseCfgLine()
def __hash__(self):
## I inlined the hash() argument below for speed... whenever I change
Expand Down

0 comments on commit 7f76e22

Please sign in to comment.