Open
Labels
Description
The documentation for _repr_pretty_ at the end of the Rich Display section is confusing. It was never clear to me that this particular method was applicable in a different context than the _ipython_display_ and other _repr_* methods.
Though the paragraph starts with
To customize how the REPL pretty-prints your object[...]
the the notebook/QTConsole-specific methods use the same naming convention, and the entire rest of the section is dedicated non-REPL usage.
I would like to update the documentation to make the distinction clearer. Here are a couple possible improvements:
- Create separate sub-sections for REPL and non-REPL display methods;
- Put
_repr_pretty_first, and reword the next section to say that the other methods are available in addition to_repr_pretty_when using IPython outside of the REPL.
Would it be possible to backport this change to other versions as well?
Activity
Carreau commentedon May 28, 2021
Hi there, if you send a PR I'm happy to try to merge it, if our bot can backport it without much difficulties, I'm happy to include it in earlier version as well.
MrMino commentedon May 30, 2021
@terrdavis if you have any questions on how to edit docs and generate them locally to test it I can help.
Can't move this forward myself atm unfortunately.
Clarify rich display docs, tabulate reprs
terrdavis commentedon Jun 7, 2021
I'm continuing the discussion from the #13008 since it is already merged.
I still have the following questions:
MrMino commentedon Jun 28, 2021
@terrdavis For the first two questions - I'll have to look into it, I haven't used those in a long time.
Don't worry about the backport. If we decide it needs one, we'll do it. WRT. docs there isn't much you can do anyway.