Mar-04-2018, 04:45 AM
If I have a program that loops infinitely, should I place a return at the end of that program anyway?
Example:
I can't imagine that it hurts anything to leave that redundant return in the code?
Example:
def main(): while (True): code block return 0 if __name__ == '__main__': main()It should never execute that return but the text editor in my IDE seems to like that return to be there so it has some idea where the end of the program should be.
I can't imagine that it hurts anything to leave that redundant return in the code?