:py:mod:`anod.qualifier` ======================== .. py:module:: anod.qualifier .. autoapi-nested-parse:: Qualifier dictionary with custom operators for Anod specs. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: anod.qualifier.Qualifier .. py:class:: Qualifier Bases: :py:obj:`dict` A dictionary of qualifiers. This class is just a dict with some surcharged methods for ease of use. .. py:method:: __sub__(other: collections.abc.Iterable[str]) -> Qualifier Create a new dict qualifier with some keys filtered-out. :param other: iterable of keys to filter out Examples: .. code:: {"k1": "v1", "k2": "v2"} - {"k2"} == {"k1": "v1"} {"k1": "v1", "k2": "v2"} - {"k2": "v3"} == {"k1": "v1"} .. py:method:: __add__(other: dict | None) -> Qualifier Create a new dict qualifier that merges two dicts. The operation is equivalent to pipe operator with the difference that its priority is higher as defined by Python standard. This allows more natural expression that mix `+` and `-` operators (both operators have the same priority). :param other: dictionary to merge with .. py:method:: __and__(other: collections.abc.Iterable[str]) -> Qualifier Create a new dict qualifier with the subset other of the keys. :param other: iterable of keys to keep Examples: .. code:: {"k1": "v1", "k2": "v2"} & {"k2"} == {"k2": "v2"} {"k1": "v1", "k2": "v2"} & {"k2": "v3"} == {"k2": "v2"}