Real Python Tutorials

LBYL vs EAFP: Preventing or Handling Errors in Python
NEW

Handling or Preventing Errors in Python: LBYL vs EAFP

In this video course, 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 discussion on LBYL vs EAFP in Python.

Dec 03, 2024 intermediate best-practices python