MemotivaCommon pitfalls and best practices

What does LBYL mean?

Common pitfalls and best practices

Audio flashcard · 0:13

Nortren·

What does LBYL mean?

0:13

LBYL stands for Look Before You Leap. It means checking preconditions before performing an operation, the opposite of EAFP. LBYL is appropriate when the check is cheap and the operation has expensive side effects. For most cases, EAFP is preferred in Python.
docs.python.org