Produce a tuple structure that is cacheable using the __dict__ of obj to retrieve values
(obj: Any, cls: Type[Any])
| 1465 | |
| 1466 | |
| 1467 | def constructor_key(obj: Any, cls: Type[Any]) -> Tuple[Any, ...]: |
| 1468 | """Produce a tuple structure that is cacheable using the __dict__ of |
| 1469 | obj to retrieve values |
| 1470 | |
| 1471 | """ |
| 1472 | names = get_cls_kwargs(cls) |
| 1473 | return (cls,) + tuple( |
| 1474 | (k, obj.__dict__[k]) for k in names if k in obj.__dict__ |
| 1475 | ) |
| 1476 | |
| 1477 | |
| 1478 | def constructor_copy(obj: _T, cls: Type[_T], *args: Any, **kw: Any) -> _T: |
nothing calls this directly
no test coverage detected