Python Performance: Why 'if not list' is 2x Faster Than Using len()
thebestaquaman @ thebestaquaman @lemmy.world Posts 11Comments 588Joined 2 yr. ago
thebestaquaman @ thebestaquaman @lemmy.world
Posts
11
Comments
588
Joined
2 yr. ago
Deleted
Permanently Deleted
If my Easter break gets boring I might just start cleaning up that Python library... It's the prime example of something that developed from a POC to a fully functional code base, was left largely unused for about a year, and just the past weeks has suddenly seen a lot of use again. Luckily we're strict about good docstrings, but type hints would have been nice too.