str: the string of the module
(self)
| 84 | f'Define the __nice__ method for {self.__class__!r}') |
| 85 | |
| 86 | def __repr__(self): |
| 87 | """str: the string of the module""" |
| 88 | try: |
| 89 | nice = self.__nice__() |
| 90 | classname = self.__class__.__name__ |
| 91 | return f'<{classname}({nice}) at {hex(id(self))}>' |
| 92 | except NotImplementedError as ex: |
| 93 | warnings.warn(str(ex), category=RuntimeWarning) |
| 94 | return object.__repr__(self) |
| 95 | |
| 96 | def __str__(self): |
| 97 | """str: the string of the module""" |