Fine with me.


On Sun, Mar 31, 2013 at 4:28 PM, Alexandre Gramfort <
notifications@github.com> wrote:

> In mne/viz.py:
>
> > +
> > +
> > +def _mutable_defaults(*mappings):
> > +    """ To avoid dicts as default keyword arguments
> > +
> > +    Use this function instead to resolve default dict values.
> > +    Example usage:
> > +    scalings, units = _mutable_defaults(('scalings', scalings,
> > +                                         'units', units))
> > +    Note. Can be any object with items method, but beware the order.
> > +    """
> > +    for k, v in mappings:
> > +        if isinstance(v, dict):
> > +            yield dict(DEFAULTS[k].items() + v.items())
> > +        else:
> > +            yield DEFAULTS[k]
>
> I just feel using a generator is an overkill here and what you want is to
> update the default dict with what you pass. So it's indeed more explicit.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/mne-tools/mne-python/pull/539/files#r3596621>
> .
>