iterate_attributes
No overview available.
def iterate_attributes(
obj: object
) - > Iterator[Tuple[str, Any]]
Iterates over the attributes of an object and yields key-value pairs for all non-callable properties. This is useful for serializing object state or inspecting data-carrying attributes while ignoring methods and internal logic.
Parameters
| Name | Type | Description |
|---|---|---|
| obj | object | The object instance whose attributes will be inspected and yielded. |
Returns
| Type | Description |
|---|---|
Iterator[Tuple[str, Any]] | An iterator yielding tuples containing the attribute name and its corresponding value. |