• Tja@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    2 days ago

    Not only nested ifs. It’s not even correct (doesn’t check for activity existing). And it’s not even pythonic (ask for forgiveness, not for permission). Just access the thing, catch the exception and be done with it.