gemseo / core / grammars

Show inherited members

required_names module

Grammar required names.

class gemseo.core.grammars.required_names.RequiredNames(grammar, names=())[source]

Bases: MutableSet[str]

A set-like class for handling grammar required names.

The names in an instance of this class shall belong to the bound grammar.

Parameters:
  • grammar (BaseGrammar) – The grammar bound to the required names.

  • names (Iterable[str]) –

    The required names.

    By default it is set to ().

add(name)[source]

Add an element.

Parameters:

name (str)

Return type:

None

discard(name)[source]

Remove an element. Do not raise an exception if absent.

Parameters:

name (str)

Return type:

None