picop.cymethod#

Bound-method helpers.

picop.cymethod.method_check(o)#

Return True if o is a bound method (PyMethod_Check). :type o: object :param o:

Return type:

bool

picop.cymethod.method_eq(a, b)#

Return True if methods equal (same function + __self__; not identity). :type a: object :param a: :type b: object :param b:

Return type:

bool

picop.cymethod.method_get_function(meth)#

Return the underlying function via checked PyMethod_Function.

Notes

Preferred spelling of method_function.

Parameters:

meth (object)

Return type:

object

picop.cymethod.method_get_self(meth)#

Return __self__ via checked PyMethod_Self.

Notes

Preferred spelling of method_self.

Parameters:

meth (object)

Return type:

object | None

picop.cymethod.method_new(func, self)#