I have an object that encapsulates a widget.
class Foo(object):
def __init__(self, widget):
self.widget = widget
I want this object to display itself as this widget in the notebook.
>>> my_widget
<fancy widget>
>>> Foo(my_widget)
<fancy widget>
Is there a method that I should implement on my Foo class to accomplish this?