gemseo.core.grammars.simpler_grammar module#
A simple grammar that does not check the data types.
- class SimplerGrammar(name, names_to_types=None, required_names=None, **kwargs)[source]#
Bases:
SimpleGrammarA simple grammar that does not check the data types.
Warning
A name can be prefixed by a namespace. Never add a namespace by any other means than the method
add_namespace().Notes
Contrary to the standard dictionary, the :meth:
.copymethod creates a deep copy.Initialize self. See help(type(self)) for accurate signature.
- Parameters:
name (str) -- The name of the grammar.
names_to_types (SimpleGrammarTypes | None) -- The mapping defining the data names as keys, and data types as values. If
None, the grammar is empty.required_names (Iterable[str] | None) -- The names of the required elements. If
None, all the elements are required.**kwargs (Any) -- These arguments are not used.
- Raises:
ValueError -- If the name is empty.