Comment on Python Performance: Why 'if not list' is 2x Faster Than Using len()
thebestaquaman@lemmy.world 2 weeks agoThere is no guarantee that the comment is kept up to date with the code. “Self documenting code” is a meme, but clearly written code is pretty much always preferable to unclear code with a comment, largely because you can actually be sure that the code does what it says it does.
Note: You still need to comment your code kids.