Also, do y’all call main() in the if block or do you just put the code you want to run in the if block?

  • driving_crooner
    link
    fedilink
    arrow-up
    6
    ·
    2 days ago

    Does everyone call the function of the script main? I never use main(), just call the function what the program is supposed to do, this program calculates the IBNR? The function is called calculate_IBNR(), then at the end of the script if name = ‘main’: calculate_IBNR(test_params) to test de script, then is imported into a tkinter script to be converter to an exe with pyinstaller

    • Whelks_chance@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      17 hours ago

      All of mine are called do_thing() because after a few days of working on it, the scope creep always means the original name was wrong anyway.