MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / update_copy

Function update_copy

lib/sqlalchemy/util/_collections.py:428–437  ·  view source on GitHub ↗

Copy the given dict and update with the given values.

(
    d: Dict[Any, Any], _new: Optional[Dict[Any, Any]] = None, **kw: Any
)

Source from the content-addressed store, hash-verified

426
427
428def update_copy(
429 d: Dict[Any, Any], _new: Optional[Dict[Any, Any]] = None, **kw: Any
430) -> Dict[Any, Any]:
431 """Copy the given dict and update with the given values."""
432
433 d = d.copy()
434 if _new:
435 d.update(_new)
436 d.update(**kw)
437 return d
438
439
440def flatten_iterator(x: Iterable[_T]) -> Iterator[_T]:

Callers

nothing calls this directly

Calls 2

copyMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected