I am currently studying the methods for each built-in function, many apply to other functions. I came across 2 methods withing the bool()
function: x.__lshift__
and x.__pow__
. Now, x.__lshift__(y)
equates to x<<y
while x.__pow__(y[, z])
equates to pow(x, y[, z])
.
My Question: These two methods appear to be almost the same ( I used them within the shell to check, if this question seems to be not thought out I probably used them incorrectly), What is the difference, usage with bool()
, between the two?