Jul-11-2025, 06:25 PM
I was surprised to find out that
If you have the following code:
isinstance(bool(1), int) returns True. Why would that be?If you have the following code:
def a(*args):
if len(args) != 3:
return False
return True
def b(*args):
return errno.EINVAL
func = <dynamically assign one of a() or b()>
ret = func()How would you check if either of the returned a failure?
