-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
Milestone
Description
I created a class where I am storing rows of data with column headers. I want to display the contents in an HTML table in notebooks, so I'm using _repr_html_
. I'd also like to access columns using the headers as attributes, like foo.column1
. However, defining __getattr__
stops _repr_html_
from being called and the notebook falls back to __repr__
. This shouldn't happen because _repr_html_
is defined in the class instance, so __getattr__
shouldn't be called. I checked if __getattr__
is being called and it appears that _ipython_canary_method_should_not_exist_
is being called and then it falls back to the normal __repr__
.