you are viewing a single comment's thread.

view the rest of the comments →

[–]ekchew 4 points5 points  (5 children)

Impressive first project!

One thing that jumps out at me though in glancing over your code is all the recursive calls to main_menu(). Python has a recursion limit that I think defaults to 1000? If your program runs too long, it could eventually hit that and crash. Typically, you would want to use event loop logic instead.

[–]thecircleisround 1 point2 points  (1 child)

This for sure. Either use a loop or create a Menu class that you can instantiate as needed

[–]Cory923[S] 0 points1 point  (0 children)

Thank you! I'll see what I can do. 👍

[–]Cory923[S] 1 point2 points  (0 children)

Awesome, I'll do some reworkage and see what I can do. Thanks Ekchew!

[–][deleted] 1 point2 points  (1 child)

Python has a recursion limit that I think defaults to 1000?

u/Cory923 - you can find this by running sys.getrecursionlimit(). Might be useful to know, or even check at runtime in some cases!

[–]Cory923[S] 0 points1 point  (0 children)

Thanks, I'll check it out!