This style using try&#x2F;except instead of if&#x2F;else is known as EAFP (Easier to Ask Forgiveness than Permission).
It&#x27;s actually recommended in the Python glossary [0].<p>[0] <a href="https:&#x2F;&#x2F;docs.python.org&#x2F;3.5&#x2F;glossary.html#term-eafp" rel="nofollow">https:&#x2F;&#x2F;docs.python.org&#x2F;3.5&#x2F;glossary.html#term-eafp</a>