Skip to content

Conversation

@kwi-dk
Copy link
Contributor

@kwi-dk kwi-dk commented Jan 23, 2020

Add a note about the non-EAFP example code also having a potential race
condition (which is one of the reasons why the EAFP style is preferred).

Update best practice code to catch the specific FileNotFoundError (new
in Python 3.3), instead of the overly broad OSError. (Add note about
using OSError in Python 2, but caution that it may be too broad.)

Update glossary link to point to Python 3 docs, for good measure.

…ndition note

Add a note about the non-EAFP example code also having a potential race
condition (which is one of the reasons why the EAFP style is preferred).

Update best practice code to catch the specific FileNotFoundError (new
in Python 3.3), instead of the overly broad OSError. (Add note about
using OSError in Python 2, but caution that it may be too broad.)

Update glossary link to point to Python 3 docs, for good measure.
@dmtucker
Copy link

Related: #125

dmtucker
dmtucker approved these changes Jan 27, 2020
@adewes adewes merged commit d88697d into quantifiedcode:master Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants