2017-05-11 18:24:29 +00:00
|
|
|
import collections
|
|
|
|
|
2017-05-22 18:20:53 +00:00
|
|
|
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))
|