INNER CODE UNIT · Python
__init__
mpenning/ciscoconfparse · ciscoconfparse/ccp_abc.py:60
def __init__(self, all_lines=None, line=DEFAULT_TEXT, comment_delimiter="!", **kwargs):
"""Accept an IOS line number and initialize family relationship attributes"""
# Hack to accept old parameter names instead of finding all the places
# where `all_text` and `text` are used and renaming attributes all
# over the place
if isinstance(kwargs.get("all_text", None), list):
all_lines = kwargs.get("all_text")
if isinstance(kwargs.get("text", None), str):
line = kwargs.get("text")
self.comment_delimiter = comment_delimiter
self._uncfgtext_to_be_deprecated = ""
self._text = DEFAULT_TEXT
self.linenum = -1
self.parent = self # by default, assign parent as itself
self.child_indent = 0
self.is_comment = None