17 lines
752 B
Python
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))
|