pretty_name
Returns the name of the object's class or the name of the object itself if it is a type.
def pretty_name(
obj: object
) - > string
Retrieves a human-readable string representation of an object's name, prioritizing the class name or the type name itself.
Parameters
| Name | Type | Description |
|---|---|---|
| obj | object | The object or class from which to extract the name identifier. |
Returns
| Type | Description |
|---|---|
string | The name of the class if the input is an instance, or the name of the type if the input is a class. |