safe_repr
No overview available.
def safe_repr(
obj: Any
) - > string
Returns a string representation of an object that is guaranteed to be printable without raising exceptions. This is primarily used for logging or debugging where the object's own repr might be broken or unsafe.
Parameters
| Name | Type | Description |
|---|---|---|
| obj | Any | The object to be converted into a string representation. |
Returns
| Type | Description |
|---|---|
string | A string representation of the object, or a fallback string if the standard representation fails. |