force_mapping
Wrap object into supporting the mapping interface if necessary.
def force_mapping(
m: Any
) - > Mapping
Wrap object into supporting the mapping interface if necessary.
Parameters
| Name | Type | Description |
|---|---|---|
| m | Any | The object to be converted or wrapped into a mapping-compatible interface, such as a LazyObject or a standard class instance. |
Returns
| Type | Description |
|---|---|
Mapping | The original object if it already implements the Mapping interface, or a DictAttribute wrapper that provides mapping access to the object's attributes. |