4 ms·
The idea that `if len(items):` indicates that you expect other things than sequences seems backwards to me. It’s the duck typing nature of, classic Python, tha
by wodenokoto 2y ago
The idea that `if len(items):` indicates that you expect other things than sequences seems backwards to me.
It’s the duck typing nature of, classic Python, that leads the community to recommend the broader `if items:`, which allows for numbers and such.