Skip to main content

is_member_abstract

FunctionSource

v_1: bool = is_member_abstract(attr: Any)

Check whether a value is an abstract member of a class.

Arguments

Requires

NameTypeRequired
Description
attrAnyThe attribute of a class. It can be a value, method, property, or operator. Note that the attribute needs to be provided by the method inspect.getmembers_static(...).

Returns

NameType
Description
v_1boolIf the attribute has been decorated by @abstractmethod, returns True. If the value is not a method (such as a variable), will return False.