A generator, duck typing, and a branchless conditional walk into a bar.
If there is a 50% chance something will go wrong, then 9 times out of 10 it will.