# moduleimport os
>>> builtins.getattr(os,"not-existing")
AttributeError: 'module'object has no attribute 'not-existing'>>>getattr.getattr(os,"not-existing")
AttributeError: module 'os' has no attribute 'not-existing'# function>>> builtins.getattr(function,"not-existing")
AttributeError: 'function'object has no attribute 'not-existing'>>>getattr.getattr(function,"not-existing")
AttributeError: function '__main__.function' has no attribute 'not-existing'# class>>>classCLS: pass>>> builtins.getattr(CLS,"not-existing")
AttributeError: typeobject'CLS' has no attribute 'not-existing'>>>getattr.getattr(CLS,"not-existing")
AttributeError: class'__main__.CLS' has no attribute 'not-existing'# class object>>> builtins.getattr(CLS(),"not-existing")
AttributeError: 'CLS'object has no attribute 'not-existing'>>>getattr(CLS(),"not-existing")
AttributeError: __main__.CLSobject has no attribute 'not-existing'