lang-model/naive-nlu/tree_nlu/modifiable_property.py
2017-05-23 19:04:44 +02:00

17 lines
752 B
Python

import collections
ModifiableProperty = collections.namedtuple('ModifiableProperty',
['getter', 'setter'])
ModifiablePropertyWithAst = collections.namedtuple('ModifiablePropertyWithAst',
[
'getter',
'setter',
'ast',
'elements',
])
def is_modifiable_property(element):
return (isinstance(element, ModifiableProperty) or
isinstance(element, ModifiablePropertyWithAst))