Q: while in main() or main() in while? Let's say that we have a main() function that invokes a few functions that have been placed into different files.
What's the best practice ?
Option 1 : Have the while loop into the main function
def main():
    interval = 60.0
    start_time = time.time()
    while True:
        # calls to our functions
        time.sleep(interval - (time.time()-start_time) % interval)

Option 2 : Having the main function called in the while loop
def main():
    # calls to our functions

interval = 60.0
start_time = time.time()
while True:
    main()
    time.sleep(interval - (time.time()-start_time) % interval)

Does it actually change anything to use one method rather than the other one ?
Thanks for your advices !

A: For technical reasons, the first seems faster, but you won't be able to see it.

It will be faster because it creates less nodes

The second case will be easier to read for a human

Which is better in most of the cases

Now, I can't tell you which one you have to use, you'll have to do it yourself because it depends on what you need.
