Good question sarina, I toyed with it both ways and couldn't convince
myself of what was necessary. (I had it raising KeyError until I went into
existential crisis)


On Thu, Aug 15, 2013 at 9:11 PM, Sarina Canelake
<notifications@github.com>wrote:

> In xblock/core.py:
>
> > @@ -88,6 +88,14 @@ def set_many(self, update_dict):
> >          for key, value in update_dict.items():
> >              self.set(key, value)
> >
> > +    def default(self, name):
> > +        """
> > +        Get the default value for this field which may depend on context or may just be the field's global
> > +        default. The default behavior is to raise KeyError which will cause the caller to return the field's
> > +        global default.
> > +        :param _name: the field's name
> > +        """
> > +        raise NotImplementedError
>
> If the default behavior is to raise KeyError, then why not raise KeyError
> here?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/edx/XBlock/pull/67/files#r5806019>
> .
>