Real Python Tutorials

LBYL vs EAFP: Preventing or Handling Errors in Python
NEW

LBYL vs EAFP: Preventing or Handling Errors in Python

In this tutorial, you'll learn about two popular coding styles in Python: look before you leap (LBYL) and easier to ask forgiveness than permission (EAFP). You can use these styles to deal with errors and exceptional situations in your code. You'll dive into the LBYL vs EAFP discussion in Python.

Jun 01, 2022 best-practices intermediate python

β€” FREE Email Series β€”

🐍 Python Tricks πŸ’Œ

Python Tricks Dictionary Merge

πŸ”’ No spam. Unsubscribe any time.

Real Python Logo

Loading More Tutorials…