Python __lshift__() Magic Method
Syntax object.__lshift__(self, other) The Python __lshift__() method implements the built-in << operation. So, when you cal x << y, Python attempts to call x.__lshift__(y). If the method is not implemented, Python first attempts to call __rlshift__ on the right operand and if this isn’t implemented either, it raises a TypeError. We call this a “Dunder … Read more