def __init__(self, db, **kwargs):
self.db = db<EOL>missing = set()<EOL>for attr, desc in self.attrs.items():<EOL><INDENT>if attr in kwargs:<EOL><INDENT>value = kwargs[attr]<EOL>if '<STR_LIT>' in desc:<EOL><INDENT>value = desc['<STR_LIT>'](value)<EOL><DEDENT><DEDENT>elif '<STR_LIT:default>' in desc:<EOL><INDENT>value = (desc['<STR_LIT:default>']() if callable(desc['<STR_LIT:default>']) else<EOL>desc['<STR_LIT:default>'])<EOL><DEDENT>else:<EOL><INDENT>missing.add(attr)<EOL>continue<EOL><DEDENT>setattr(self, attr, value)<EOL><DEDENT>if missing:<EOL><INDENT>raise TypeError("<STR_LIT>" %<EOL>'<STR_LIT:U+002CU+0020>'.join(sorted(missing)))<EOL><DEDENT>
Initialize a new limit.

:param db: The database the limit object is in.

For the permissible keyword arguments, see the `attrs`
dictionary.