def fromdict(self, src_dict, method='<STR_LIT>'):
if method == '<STR_LIT>':<EOL><INDENT>_method = self.set_method<EOL><DEDENT>else:<EOL><INDENT>_method = self.add_method<EOL><DEDENT>if hasattr(src_dict, '<STR_LIT>'):<EOL><INDENT>for (key, val) in src_dict.iteritems():<EOL><INDENT>_method(self, key, len(key), val)<EOL>if self.k:<EOL><INDENT>self._update(key, val)<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>for (key, val) in src_dict.items():<EOL><INDENT>_method(self, key, len(key), val)<EOL>if self.k:<EOL><INDENT>self._update(key, val)<EOL><DEDENT><DEDENT><DEDENT>
Set values from dict
        Params:
            <dict <str> <int>> src_dict