Closed
Description
Bug report
Anyone tried:
>>> import matplotlib
>>> len(matplotlib.rcParams)
0
A great example of shooting yourself in the foot with multiple inheritance. Essentially, we do
class RcParams(MutableMapping, dict):
def __getitem__(self, key):
return dict.__getitem__(self, key)
def __setitem__(self, key, val):
return dict.__setitem__(self, key, val)
but do not reimplement __len__
. You can work out the consequences yourself.
Proposed solution
Do not inherit RcParams
from dict, and use a private data dict instead.
Metadata
Metadata
Assignees
Labels
No labels