The operators module has a helper method operator.abs . But in python abs there is already a function, and the only way I know to use the __abs__ method for an object is to call the function.
Is there any other bizarre way that I don't know to accept the absolute value of a number? If not, why does operator.abs exist in the first place, and what is an example where you have to use it instead of the plain old abs ?
source share