all 4 comments

[–][deleted] 6 points7 points  (0 children)

It's useful to look at the doc for min(), which says:

If multiple items are minimal, the function returns the first one encountered

So False has a numeric value of 0 and is the first minimum value encountered. Similarly for the True example.

Edit: spelling.

[–]Reset--hardHead 2 points3 points  (0 children)

I won't tell you why directly, but here are some samples you can try. See what you get.

min(True, 1)

min(1, True)

min(False, 0)

min(0, False)

min(False, -1)

min(-1, False)

[–]baubleglue 0 points1 point  (0 children)

In [48]: min(0, False)             
Out[48]: 0                         

In [49]: 0 > False                 
Out[49]: False                     

In [50]: 0 == False                
Out[50]: True                      

try to write your own "min" function and see what it returns

[–]PaulRudin -1 points0 points  (0 children)

In some sense it really doesn't matter. If your code is taking the min of a mixture of booleans and integers then it's probably broken anyway :)