From 87bbd154cc1e40da978ba6cdb8193c13aa5db7ef 2014-07-03 10:01:56 From: Gordon Ball Date: 2014-07-03 10:01:56 Subject: [PATCH] Remove 4-5 tuple forms from interact() --- diff --git a/IPython/html/widgets/interaction.py b/IPython/html/widgets/interaction.py index 113c2fe..1b59de8 100644 --- a/IPython/html/widgets/interaction.py +++ b/IPython/html/widgets/interaction.py @@ -23,7 +23,7 @@ from inspect import getcallargs from IPython.core.getipython import get_ipython from IPython.html.widgets import (Widget, TextWidget, FloatSliderWidget, IntSliderWidget, CheckboxWidget, DropdownWidget, - ContainerWidget, DOMWidget, IntRangeSliderWidget, FloatRangeSliderWidget) + ContainerWidget, DOMWidget) from IPython.display import display, clear_output from IPython.utils.py3compat import string_types, unicode_type from IPython.utils.traitlets import HasTraits, Any, Unicode @@ -107,26 +107,6 @@ def _widget_abbrev(o): else: cls = FloatSliderWidget return cls(value=value, min=min, max=max, step=step) - elif _matches(o, [float_or_int]*4): - min, low, high, max = o - if not min <= low <= high <= max: - raise ValueError("Range input expects min <= low <= high <= max, got {0}".format(o)) - if all(isinstance(_, int) for _ in o): - cls = IntRangeSliderWidget - else: - cls = FloatRangeSliderWidget - return cls(value=(low, high), min=min, max=max) - elif _matches(o, [float_or_int]*5): - min, low, high, max, step = o - if not min <= low <= high <= max: - raise ValueError("Range input expects min <= low <= high <= max, got {0}".format(o)) - if step <= 0: - raise ValueError("step must be >= 0, not %r" % step) - if all(isinstance(_, int) for _ in o): - cls = IntRangeSliderWidget - else: - cls = FloatRangeSliderWidget - return cls(value=(low, high), min=min, max=max, step=step) else: return _widget_abbrev_single_value(o)