Split grammar update method
The argument of the method update
of grammars can be of several different types which makes it difficult to understand.
In a similar way as the method update_from_data
, we could split the update
method into several methods with clearer namings and leave update
just for when the argument is another grammar like it is for update
of a dictionary.
We could have the following argument types and methods go together:
- list of names (implicitly supposed to be validated against ndarray): split to the method named
update_from_names
- json schema as a python dict (only for
JSONGrammar
): split to the method namedupdate_from_schema
- names bound to python types (only for
SimpleGrammar
): split to the method namedupdate_from_types
@All Please tell your opinion.