def getmethattr(obj, meth):
  if hasmethod(obj, meth):
    return getattr(obj, meth)()
  elif hasvar(obj, meth):
    return getattr(obj, meth)
  return None
Returns either the variable value or method invocation
dataset/ETHPy150Open nikcub/floyd/floyd/util/object.py/getmethattr