• ExtremeDullard@lemmy.sdf.org
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    11 hours ago

    In complex cases where speed is less important than maintainability, I tend to agree.

    In this case, a simple comment would suffice. And in fact nothing at all would be okay for any half-competent Python coder, as testing if lists are empty with if not is super-standard.