reduce(lambda obj, attr: getattr(obj, attr, None), ('id', 'num'), myobject)"