From a9dd34fc85f51551781fe350d6838795954273e3 2014-07-18 16:59:41 From: Jason Grout Date: 2014-07-18 16:59:41 Subject: [PATCH] Container assumes the children attribute is not None Thanks to @SylvainCorlay for pointing this out. --- diff --git a/IPython/html/widgets/widget_container.py b/IPython/html/widgets/widget_container.py index 74b96d5..6ba8206 100644 --- a/IPython/html/widgets/widget_container.py +++ b/IPython/html/widgets/widget_container.py @@ -15,9 +15,9 @@ class ContainerWidget(DOMWidget): # Child widgets in the container. # Using a tuple here to force reassignment to update the list. # When a proper notifying-list trait exists, that is what should be used here. - children = Tuple(sync=True) + children = Tuple(sync=True, allow_none=False) - def __init__(self, children = None, **kwargs): + def __init__(self, children = (), **kwargs): kwargs['children'] = children super(ContainerWidget, self).__init__(**kwargs) self.on_displayed(ContainerWidget._fire_children_displayed)