diff --git a/IPython/html/widgets/__init__.py b/IPython/html/widgets/__init__.py index 19654b7..7b6d0a8 100644 --- a/IPython/html/widgets/__init__.py +++ b/IPython/html/widgets/__init__.py @@ -9,4 +9,4 @@ from .widget_int import IntTextWidget, BoundedIntTextWidget, IntSliderWidget, In from .widget_selection import RadioButtonsWidget, ToggleButtonsWidget, DropdownWidget, SelectWidget from .widget_selectioncontainer import TabWidget, AccordionWidget from .widget_string import HTMLWidget, LatexWidget, TextWidget, TextareaWidget -from .interaction import interact, interactive, const +from .interaction import interact, interactive, fixed diff --git a/IPython/html/widgets/interaction.py b/IPython/html/widgets/interaction.py index b11fff0..8316381 100644 --- a/IPython/html/widgets/interaction.py +++ b/IPython/html/widgets/interaction.py @@ -107,7 +107,7 @@ def _widget_abbrev(o): def _widget_from_abbrev(abbrev): """Build a Widget intstance given an abbreviation or Widget.""" - if isinstance(abbrev, Widget) or isinstance(abbrev, const): + if isinstance(abbrev, Widget) or isinstance(abbrev, fixed): return abbrev widget = _widget_abbrev(abbrev) @@ -190,7 +190,7 @@ def interactive(__interact_f, **kwargs): kwargs_widgets.extend(_widgets_from_abbreviations(sorted(kwargs.items(), key = lambda x: x[0]))) # This has to be done as an assignment, not using container.children.append, - # so that traitlets notices the update. We skip any objects (such as const) that + # so that traitlets notices the update. We skip any objects (such as fixed) that # are not DOMWidgets. c = [w for w in kwargs_widgets if isinstance(w, DOMWidget)] container.children = c @@ -240,9 +240,9 @@ def interact(__interact_f=None, **kwargs): return f return dec -class const(HasTraits): - """A pseudo-widget whose value is constant and never client synced.""" +class fixed(HasTraits): + """A pseudo-widget whose value is fixed and never synced to the client.""" value = Any(help="Any Python object") description = Unicode('', help="Any Python object") def __init__(self, value, **kwargs): - super(const, self).__init__(value=value, **kwargs) + super(fixed, self).__init__(value=value, **kwargs)