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?

  • TheNamlessGuy@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    18 days ago

    Both are indeed equally terrible, even if it is for different reasons.

    The one true choice is of course letting the programmer choose the main function in compile/interpretation-time.

    I.e. python main.py --start "main" would start by calling the main function in main.py