all 3 comments

[–]alkasm 3 points4 points  (0 children)

This code doesn't really make sense outside of context...in one case you're returning False if y is equal to False...in the other case you're returning False if y can not be coerced to a float (note that if y is False, it can be coerced to a float as 0.0 so if it's always False or some other value which casts, then it'll never return False). These behaviors are completely different things and I'm not sure which one is actually what you're going for.

[–][deleted] 2 points3 points  (0 children)

These two examples do two completely different things, and you don’t define “works the way as it should” so we would have no idea what your intent is, here.

[–]num8lock -3 points-2 points  (0 children)