Returns the inverse
val**-1 of the given value, if defined.
val: Any, default: Any = RaiseTypeErrorIfNotProvided
) -> Any
Used in the notebooks
An object can define an inverse by defining a pow(self, exponent) method
that returns something besides NotImplemented when given the exponent -1.
The inverse of iterables is by default defined to be the iterable's items,
each inverted, in reverse order.
The value (or iterable of invertible values) to invert.
Determines the fallback behavior when
val doesn't have
an inverse defined. If
default is not set, a TypeError is raised.
default is set to a value, that value is returned.
val has a pow method that returns something besides
NotImplemented when given an exponent of -1, that result is returned.
val is iterable, the result is a tuple with the same
val but in reverse order and with each item inverted.
Otherwise, if a
default argument was specified, it is returned.
val doesn't have a pow method, or that method returned
NotImplemented when given -1. Furthermore
val isn't an
iterable containing invertible items. Also, no