From a9d723dd6922185463911da2d6181875904cdcda Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Thu, 10 Jun 2021 09:29:50 +0100 Subject: [PATCH] added angular example --- docs/source/pretty.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/source/pretty.rst b/docs/source/pretty.rst index 546e7192..f1c9afaf 100644 --- a/docs/source/pretty.rst +++ b/docs/source/pretty.rst @@ -157,4 +157,13 @@ You can also tell Rich to generate the *angular bracket* style of repr, which te __rich_repr__.angular = True +This will change the output of the Rich repr example to the following:: + + { + 'gull': , + 'penguin': , + 'dodo': + } + + Note that you can add ``__rich_repr__`` methods to third-party libraries *without* including Rich as a dependency. If Rich is not installed, then nothing will break. Hopefully more third-party libraries will adopt Rich repr methods in the future. \ No newline at end of file