pyphi.models.cmp.sametype#

pyphi.models.cmp.sametype(func)[source]#

Method decorator to return NotImplemented if the args of the wrapped method are of different types.

When wrapping a rich model comparison method this will delegate (reflect) the comparison to the right-hand-side object, or fallback by passing it up the inheritance tree.

Parameters:

func (Callable[[T, T], bool])

Return type:

Callable[[T, object], bool | Any]