If getattr() fails, hasattr() will fail as well.
Removed hasattr() check, because hasattr() will call getattr() internally anyway. If hasattr() fails, it means that getattr() has failed. So, there is no need to call hasattr() before getattr().
Showing
Please register or sign in to comment