def getattr(attr, default=None):
 def getter(value):
  return _getattr(value, attr, default)
 return transform(getter)

def getattr ( attr , default = None ) : def getter ( value ) : return _getattr ( value , attr , default ) return transform ( getter )
get a named attribute from an object .