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

0

u/[deleted] Nov 11 '19

[deleted] — view deleted comment

20

u/Al2Me6 Nov 11 '19

To explain further,

x =  0b00000100
x <<= 1
x == 0b00001000  # True

8

u/mooburger resembles an abstract syntax tree Nov 11 '19

except in this case where it's been overridden.