Shorten python code for getting detail info

Kind of hack into `__getattr__` which will be called when the requested attribute does not exist.