quemb.molbe.chemfrag.restrict_keys

quemb.molbe.chemfrag.restrict_keys(D, keys)

Restrict the keys of a dictionary to a subset.

The function has the interface declared in such a way that if the subset of keys is actually a subtype of the type of the keys, the type of the keys of the returned dictionary is narrowed down.

Return type:

Mapping[TypeVar(Key, bound= Hashable), TypeVar(Val)]