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

    Not only nested ifs. It’s not even correct (doesn’t check for activities 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.