The language is python and it has short circuiting aka in an and condition, if the first block isn’t fulfilled the second one isn’t tested because it’s unnecessary.
Same with or and the reverse.
Comment on The Legends is among us
kernelle@0d.gs 1 day agoThe problem with this in the OP is the first ‘if’ checks if the object exists and the second gets a property of said object only if the original object exists.
I’m not saying the OP is good code, but chaining them like this would result in exceptions.
The language is python and it has short circuiting aka in an and condition, if the first block isn’t fulfilled the second one isn’t tested because it’s unnecessary.
Same with or and the reverse.
rothaine@lemm.ee 1 day ago
Not in a language with short circuiting.
kernelle@0d.gs 1 day ago
Could’ve sworn I’ve had this issue before! Maybe not with python
rothaine@lemm.ee 1 day ago
Yeah not all languages do it. I find it rather convenient though