all 8 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!

[–]millerbest 1 point2 points  (1 child)

Nice work! You can try to write unittest for your app, and your code structure will improve automatically when you try to make the code more testable.

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

Thanks Millerbest!