def mattrgetter(*attrs):
 return (lambda obj: dict(((attr, getattr(obj, attr, None)) for attr in attrs)))

def mattrgetter ( * attrs ) : return ( lambda obj : dict ( ( ( attr , getattr ( obj , attr , None ) ) for attr in attrs ) ) )
get attributes .