def get_bool(self, key, default=None):
v = self.get(key, default)<EOL>if v != default:<EOL><INDENT>v = v.strip().lower()<EOL>if v == '<STR_LIT:true>':<EOL><INDENT>v = True<EOL><DEDENT>elif v == '<STR_LIT:false>':<EOL><INDENT>v = False<EOL><DEDENT>elif default is None:<EOL><INDENT>raise RuntimeError("<STR_LIT>" % v)<EOL><DEDENT>else:<EOL><INDENT>v = default<EOL><DEDENT><DEDENT>return v<EOL>
Same as :meth:`dict.get`, but the value is converted to a bool.

The boolean value is considered, respectively, :obj:`True` or
:obj:`False` if the string is equal, ignoring case, to
``'true'`` or ``'false'``.