Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

__rlshift__, __ror__ in Python

I noticed that this recipe seems to use __rlshift__, __ror__ like operators. But, they aren't in the documentation! Can anyone explain these and perhaps point to some docs?

like image 612
Casebash Avatar asked Mar 08 '10 08:03

Casebash


1 Answers

See the documentation for:

  • object.__rlshift__()
  • object.__ror__()

__rlshift__ is the swapped operands version of __lshift__, used when the right-hand operand supports the operation but the left-hand operand doesn't.

like image 149
Mark Dickinson Avatar answered Oct 26 '22 19:10

Mark Dickinson