Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling LBYL an anti-pattern is not exactly correct #125

Open
tucked opened this issue May 15, 2019 · 0 comments
Open

Calling LBYL an anti-pattern is not exactly correct #125

tucked opened this issue May 15, 2019 · 0 comments

Comments

@tucked
Copy link

tucked commented May 15, 2019

https://mail.python.org/pipermail/python-dev/2014-March/133118.html

I disagree with the position that EAFP is better than
LBYL, or "generally recommended" by Python. (Where do you get that? From
the same sources that are so obsessed with DRY they'd rather introduce a
higher-order-function than repeat one line of code? :-)

IMO, the primary motivation for EAFP over LBYL is avaoiding TOCTOU bugs.

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

No branches or pull requests

1 participant