Python Forum
exiting the outer function from the inner function
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
exiting the outer function from the inner function
#2
You have a few things going on that are unusual.

menu calls outer, outer calls inner, and inner calls menu. That's a recipe for an infinite recursion. I don't think it's needed. Perhaps if you had more specifics about what the functions should do, we could have some suggestions. Right now it seems to be a control flow example, but the control flow looks odd.

Also, there's no reason to have the inner function defined inside the outer. It doesn't reference any variables in the outer function, so better would be to have them independent. That doesn't prevent them from calling each other.
banidjamali, buran, ndc85430 like this post
Reply


Messages In This Thread
RE: exiting the outer function from the inner function - by bowlofred - Feb-24-2021, 07:43 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Pandas Outer merge skollu826 2 1,085 Apr-20-2024, 06:28 PM
Last Post: deanhystad
  The function of double underscore back and front in a class function name? Pedroski55 9 2,733 Feb-19-2024, 03:51 PM
Last Post: deanhystad
  can Inner Class reference the Outer Class's static variable? raykuan 6 9,481 Jul-01-2022, 06:34 AM
Last Post: SharonDutton
  Exit function from nested function based on user input Turtle 5 4,814 Oct-10-2021, 12:55 AM
Last Post: Turtle
Question Stopping a parent function from a nested function? wallgraffiti 1 4,805 May-02-2021, 12:21 PM
Last Post: Gribouillis
  Return not exiting function?? rudihammad 3 7,715 Dec-01-2020, 07:11 PM
Last Post: bowlofred
  Passing argument from top-level function to embedded function JaneTan 2 3,150 Oct-15-2020, 03:50 PM
Last Post: deanhystad
  use NULL as function parameter which is a pointer function? oyster 0 3,195 Jul-11-2020, 09:02 AM
Last Post: oyster
  Unindent does not match any outer intendation level -error MaartenRo 3 3,221 Jun-28-2020, 11:46 AM
Last Post: MaartenRo
  How to use function result in another function Ayckinn 4 4,105 Jun-16-2020, 04:50 PM
Last Post: Ayckinn

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020