3 ms·
The assumption in the example is that baz() required foo to not be None; attempting to use None where you expect a string will probably in an AttributeError. A
by sgarland 2y ago
The assumption in the example is that baz() required foo to not be None; attempting to use None where you expect a string will probably in an AttributeError.
As to your example, both LBYL and EAFP are accepted Python standards.