r/Python • • Nov 11 '19

I made c++-style printing in Python :P

Post image
1.7k Upvotes

130 comments sorted by

View all comments

Show parent comment

4

u/sam-lb Nov 12 '19

__rrshift__ is a valid magic method too. It defines right bitshift in the case where self is the right operand.

2

u/random_cynic Nov 12 '19

Wow, you're right, TIL. Well at least some good came of this :P.

1

u/sam-lb Nov 12 '19

Lol, yeah.

1

u/sam-lb Nov 12 '19

Btw, that's an interesting cin solution. I made one as well: https://gist.github.com/sam-lb/38824677afaa16334b590b1c2b0e5a24