Commit 479daa91 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Make PropertyMap instancess callable

This allows them to be modified and passed forward in one expression.
parent 88cf9f15
......@@ -575,6 +575,11 @@ class PropertyMap(object):
"""Return True if the property is writable."""
return self.__map.is_writable()
def __call__(self, a):
p = self.copy()
p.fa = a
return p
def _check_prop_writable(prop, name=None):
if not prop.is_writable():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment