Returning from a multiple stacked call at once

Cameron Simpson cs at cskk.id.au
Sat Dec 12 03:18:25 EST 2020


On 12Dec2020 07:39, ast <ast at invalid> wrote:
>In case a function recursively calls itself many times,
>is there a way to return a data immediately without
>unstacking all functions ?

Not really. Do you have an example where this is inconvenient?

There are alternatives, for example passing in a Queue and put()ing the 
data onto the queue. It's quite dependent on what you're trying to do 
though.

Cheers,
Cameron Simpson <cs at cskk.id.au>


More information about the Python-list mailing list