holoviz / holoviz/param

Deprecate %params line magic

Open
#1,000 2 comments 0 reactions 0 assignees View on GitHub
status: discussion
Dominant language
Python
Stars
521
Forks
86
Avg merge
1d 13h
Merged PRs (30d)
35

Description

I had completely forgotten param provided the `%params` line magic for IPython.

![Image](https://github.com/user-attachments/assets/bfee82f7-8651-4ef1-8394-92049400c041)

`%params` is not documented on the website. I'm in favor of deprecating it, although there's a catch. While I think the HTML repr is a better alternative in a notebook, there would no longer be an easy way to display the custom IPython repr in an IPython console (`print(param.parameterized.param_pager())`); `?` displays the *class* docstring and not the current values of the instance.

From a [quick search](https://ipython.readthedocs.io/en/8.26.0/config/integrating.html#custom-methods), implementing `_repr_pretty_` seems to be the way for an object to have both a fancier IPython repr and an HTML repr (already implemented with `_repr_html_`). I think that would mean that the implementation wouldn't be as a pager (https://ipython.readthedocs.io/en/8.26.0/api/generated/IPython.lib.pretty.html) but I'm not sure to which extent the pager is useful, is the repr long enough to justify it?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.