New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename special display methods and put them lower in priority than display functions #291
Comments
I also suggest that they not use the |
@ellisonbg, this is also on our immediate todo so I made it critical. We should have that protocol sorted out before release (I can also help on that). |
In the spirit of "Namespaces are one honking great idea -- let's do more of those!", how about prefixing these special ipython methods with an |
There is a danger in not having an ipython prefix in these names. ipython_repr_html ? Brian On Sat, Apr 9, 2011 at 8:35 PM, jasongrout
Brian E. Granger |
Or here's another idea: |
Or, one thing that was suggested before, have a dictionary of mimetype -> method, so we could do:
This also makes it easy to replace the methods at runtime. The difficulty is that the method references in the dictionary won't be automatically bound on instantiation, so we'd have to find a neat way of handling it. |
On Sun, Apr 10, 2011 at 4:41 AM, takluyver
The problem with this is that classes that want to implement printing
Brian E. Granger |
This is merged. |
Closing... |
What is merged? Do you happen to have a link to the commit(s)? |
On Tue, May 17, 2011 at 9:36 PM, jasongrout
Brian E. Granger |
Our new display system uses special methods like
__html__
,__latex__
to allow objects to declare their representations. We need to rethink how we want to name these methods. Soe ideas are:__repr_html__
,__disp_html__
, etc.R. Kern also suggested that these special methods are used after global display functions are attempted.
The text was updated successfully, but these errors were encountered: