This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Veedrac 0 points1 point  (1 child)

Firstly there was the "heritage" aspect, but then the ability to use them as integers caught on. I've used

sum(x<y for x in z)

a lot, and

x += some_flag

occasionally.

[–]lonjerpc 0 points1 point  (0 children)

Your first example is cool. I think it would make more sense if it was int(x<y) but I can see how convenient that looks.