Comment on Python Performance: Why 'if not list' is 2x Faster Than Using len()
LegoBrickOnFire@lemmy.world 2 days agoI really dislike using boolean operators on anything that is not a boolean. I recently made an esception to my rule and got punished… Yeah it is skill issue on my part that I tried to check that a variable equal to 0 was not None using “if variable…”. But many programming rules are there to avoid bugs caused by this kind of inattention.