str: the string of the module
(self)
| 365 | f'Define the __nice__ method for {self.__class__!r}') |
| 366 | |
| 367 | def __repr__(self): |
| 368 | """str: the string of the module""" |
| 369 | try: |
| 370 | nice = self.__nice__() |
| 371 | classname = self.__class__.__name__ |
| 372 | return f'<{classname}({nice}) at {hex(id(self))}>' |
| 373 | except NotImplementedError as ex: |
| 374 | warnings.warn(str(ex), category=RuntimeWarning) |
| 375 | return object.__repr__(self) |
| 376 | |
| 377 | def __str__(self): |
| 378 | """str: the string of the module""" |