This commit is contained in:
Will McGugan 2021-06-10 12:26:28 +01:00
parent a9d723dd69
commit 7111aa9d6e
2 changed files with 7 additions and 1 deletions

View file

@ -166,4 +166,8 @@ This will change the output of the Rich repr example to the following::
}
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.
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.
## Example
See `repr.py <https://github.com/willmcgugan/rich/blob/master/examples/repr.py>`_ for the example code used in this page.

View file

@ -15,6 +15,8 @@ class Bird:
yield "fly", self.fly, True
yield "extinct", self.extinct, False
# __rich_repr__.angular = True
from rich import print