diff --git a/lib/matplotlib/style/core.py b/lib/matplotlib/style/core.py index 577c9f51e7a5..27763d370fd2 100644 --- a/lib/matplotlib/style/core.py +++ b/lib/matplotlib/style/core.py @@ -43,14 +43,14 @@ def _remove_blacklisted_style_params(d, warn=True): o = {} - for key, val in d.items(): + for key in d: # prevent triggering RcParams.__getitem__('backend') if key in STYLE_BLACKLIST: if warn: cbook._warn_external( "Style includes a parameter, '{0}', that is not related " "to style. Ignoring".format(key)) else: - o[key] = val + o[key] = d[key] return o