def static_get_type_attr ( t , name ) : for type_ in t . mro ( ) : try : return vars ( type_ ) [ name ] except KeyError : pass raise AttributeError ( name )
get proto type name python
Get a type attribute statically circumventing the descriptor protocol .
def static_get_type_attr(t, name):
    """
    Get a type attribute statically, circumventing the descriptor protocol.
    """
    for type_ in t.mro():
        try:
            return vars(type_)[name]
        except KeyError:
            pass
    raise AttributeError(name)