type_from_default_value
Full name: ase2sprkkr.ase.test.grammar_types.grammar_type.type_from_default_value
- ase2sprkkr.ase.test.grammar_types.grammar_type.type_from_default_value(value, format='', format_all=False, type_map={})[source]
Guess the grammar type from a value, that will become the default value of the grammar type.
It has to create a new object instance, as it has to set the default value property of the returned object. An (output) format can be applied to the resulting grammar type
Grammar types passed as types are left as is, unless format_all flag is set.