Comment on Python Performance: Why 'if not list' is 2x Faster Than Using len()

<- View Parent
thebestaquaman@lemmy.world ⁨2⁩ ⁨weeks⁩ ago

There 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.

source
Sort:hotnewtop