• adONis@lemmy.world
    link
    fedilink
    arrow-up
    42
    ·
    9 months ago

    Lol… stupid junior-devs… in such case you should go with switch-statements instead… much cleaner.

    • Gumus@lemmy.world
      link
      fedilink
      arrow-up
      12
      arrow-down
      1
      ·
      9 months ago

      Switch-statement (called match) was added to Python 3.10 in late 2021. This is a reasonable, albeit older style of enumerated branching.

      • vithigar@lemmy.ca
        link
        fedilink
        arrow-up
        8
        arrow-down
        3
        ·
        9 months ago

        Switch statements and differently named but similarly purposed statements have been around since the 60s. Get outta here with this “switch is a newer style because python only just got them” nonsense.