def __init__(self, mode='<STR_LIT>', chars=None):
modes = ['<STR_LIT:left>', '<STR_LIT:right>', '<STR_LIT>']<EOL>if mode not in modes:<EOL><INDENT>raise InvalidOption('<STR_LIT>')<EOL><DEDENT>self.mode = mode<EOL>self.chars = None<EOL>if chars:<EOL><INDENT>self.chars = str(chars)<EOL><DEDENT>
Initialize filter
Accepts a number of modifiers to specify strip mode (left, right, both)
and possible optional characters to strip. By default strips
whitespaces and tabs from both sides.

:param mode:                string, strip mode
:param chars:               string or None, characters to strip
:return:                    None