task_name_from
Returns the 'name' attribute of the task object if it exists; otherwise, returns the task object itself.
def task_name_from(
task: object
) - > string
Extracts the name attribute from a task object or returns the object itself if the attribute is missing.
Parameters
| Name | Type | Description |
|---|---|---|
| task | object | The task object to inspect for a name attribute or the fallback value to return. |
Returns
| Type | Description |
|---|---|
string | The name of the task if available, otherwise the original task object. |