Re:Clever code is probably the worst code you could write
by sgarland on Tuesday May 21, 2024 @09:20PM
(#40436336)
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.
As to your example, both LBYL and EAFP are accepted Python standards.