Skip to the content.

Dict Utils

Auto-generated documentation for fundom.pointfree.dict_utils module.

maybe_get

[find in source code]

@hof1
def maybe_get(key: TKey, arg: dict[TKey, TValue]) -> TValue | None:

Point-free version if dict.get with default None.

Arguments

Returns

TValue None: value.

See also

try_get

[find in source code]

@hof1
@safe
def try_get(key: TKey, arg: dict[TKey, TValue]) -> TValue:

Point-free version of dict[key].

Error-safe, returns KeyError in case key is not present and __missing__() is not provided.

Arguments

Returns

See also