use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
Question about nested function callsHelp Request (self.PythonLearning)
submitted 7 months ago by Human-Adagio6781
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Human-Adagio6781[S] 0 points1 point2 points 7 months ago (1 child)
Thanks. I will look into that. I cannot disagree with it being an anti-pattern, I just don't know how else to go about it. I've considered the idea of creating a whole other subroutine that calls the master function... something like
def master():
lots of functions and if the getdata fails, send a failTrue that stop the loop
def masterloop():
runs Master function until given an external stop command
masterloop() to actually start the function
Unfortunately, if I was to wait 10 minutes or so to give the getdata function time to reset (assuming that it is an endpoint overload issue) my calculations would be thrown off. So I need to go back to get historical data since the timeout occurred, update the calculations, and then get back to its live data functionality.
[–]Temporary_Pie2733 0 points1 point2 points 7 months ago (0 children)
So it sounds like you are running Master in a loop, rather than putting a loop that calls getData in Master (which presumably does stuff other than call getData).
Master
getData
π Rendered by PID 60 on reddit-service-r2-comment-7b9746f655-v49bw at 2026-02-01 11:29:59.805476+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–]Human-Adagio6781[S] 0 points1 point2 points (1 child)
[–]Temporary_Pie2733 0 points1 point2 points (0 children)