def _inherited(parent_attr, direct_attr):
 getter = (lambda self: (getattr(self.parent, parent_attr) if (self.parent and (self.parent.id != self.id)) else getattr(self, direct_attr)))
 setter = (lambda self, val: (setattr(self.parent, parent_attr, val) if (self.parent and (self.parent.id != self.id)) else setattr(self, direct_attr, val)))
 return property(getter, setter)

def _inherited ( parent_attr , direct_attr ) : getter = ( lambda self : ( getattr ( self . parent , parent_attr ) if ( self . parent and ( self . parent . id != self . id ) ) else getattr ( self , direct_attr ) ) ) setter = ( lambda self , val : ( setattr ( self . parent , parent_attr , val ) if ( self . parent and ( self . parent . id != self . id ) ) else setattr ( self , direct_attr , val ) ) ) return property ( getter , setter )
return a descriptor delegating to an attr of the original document .