From 7bcced9da01ad55d71e2338dc38c3faa49d13784 Mon Sep 17 00:00:00 2001 From: Jason Goad Date: Sat, 27 Sep 2014 12:14:21 -0700 Subject: [PATCH] widget fix? --- IPython/html/widgets/widget_int.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/IPython/html/widgets/widget_int.py b/IPython/html/widgets/widget_int.py index 582ae0304..9a36b88a8 100644 --- a/IPython/html/widgets/widget_int.py +++ b/IPython/html/widgets/widget_int.py @@ -26,6 +26,10 @@ class _Int(DOMWidget): disabled = Bool(False, help="Enable or disable user changes", sync=True) description = Unicode(help="Description of the value this widget represents", sync=True) + def __init__(self, value=None, **kwargs): + if value is not None: + kwargs['value'] = value + super(_Int, self).__init__(**kwargs) class _BoundedInt(_Int): """Base class used to create widgets that represent a int that is bounded