From d92b646390a41a5e8b498cea7fc86a3bc199b71a 2015-01-20 00:01:18 From: Min RK Date: 2015-01-20 00:01:18 Subject: [PATCH] Don't use widget.description as kwarg key in interact. description can be set manually, so it cannot be relied upon to store the kwarg key. Add a `widget._kwarg` attribute instead. --- diff --git a/IPython/html/widgets/interaction.py b/IPython/html/widgets/interaction.py index 7a3a789..d21f12f 100644 --- a/IPython/html/widgets/interaction.py +++ b/IPython/html/widgets/interaction.py @@ -155,6 +155,7 @@ def _widgets_from_abbreviations(seq): widget = _widget_from_abbrev(abbrev, default) if not widget.description: widget.description = name + widget._kwarg = name result.append(widget) return result @@ -194,7 +195,7 @@ def interactive(__interact_f, **kwargs): container.kwargs = {} for widget in kwargs_widgets: value = widget.value - container.kwargs[widget.description] = value + container.kwargs[widget._kwarg] = value if co: clear_output(wait=True) if manual: