mne-tools/mne-python — pull request #539 by dengemann (2013-03-31 01:03:59+00:00)
Title: ENH: remove mutables from func params + use handle

This addresses our discussion on #534.
Currently, we pass quite some dicts in viz funcitons, which is handy.
However the dict defaults parameters have at least two disadvantages.
First, updating is made difficult.
Instead of saying `raw.plot(color=dict(mag='r'))` you have to say:
`raw.plot(color=dict(mag='r', grad='b', eeg='k', eog='k', ecg='r',
emg='k', ref_meg='steelblue', misc='k', stim='k',
resp='k', chpi='k'))` -- in other words, you have to pass the
entire expected dict with just one parameter changed,
which is cumbersome.
Second, some folks consider mutable defaults `bad design` / dangerous /
not clean / whatever.

This proposal addresses both issues by creating a dict of default
dicts in the mne.viz name space + a tiny function that can be used
to 'resolve' the related dict params that now default to None.