Say I have a myObject class with a member called prop. I have a variable var which may or may not be a myObject. I want to check if prop holds a certain value, and if so, do something, and if it doesn't, or var is not a myObject, do nothng.
Would it be safe to do the following:
if isinstance(var, myObject) and var.prop == 10:
#Do something
Basically, is it guaranteed that the second part of that if statement will not be checked if the first part evaluates to False? If it is checked even if var is not a myObject, an error will be thrown.