Runtime Types

types.MethodWrapperType — runtime type

Identifies bound native special methods such as object().__str__. The bound receiver is available through __self__. The corresponding class attribute is a wrapper descriptor. Do not conflate it with a bound Python-defined MethodType.

Formal Syntax & Structure

python syntaxpython
types.MethodWrapperType

Return Value

type

The class object types.MethodWrapperType; this reference documents the class identity, not a universal constructor signature.

Working Example

Example Snippetpython
import typesitem=object()value = item.__str__print(isinstance(value, types.MethodWrapperType))
Python Reference