new to python - trouble calling a function from another function
urban.dani at gmail.com
Thu Aug 5 20:01:37 CEST 2010
> I'm building an elevator simulator for a class assignment. I recently ran
> into a roadblock and don't know how to fix it. For some reason, in my
> checkQueue function below, the call to self.goUp() is never executed. It is
> on the last line of code I pasted in. I can put print statements before and
> after the call and I have a print statement in goUp() itself. Only the
> print statements before and after the call are executed. The one inside
> goUp() is never executed because goUp() never seems to be executed. How can
> that be? I don't get any errors when the script executes. Surely this isn't
> some limitation I'm encountering?
I think the self.goUp() call is executed, the goUp function gets
called, returns a generator object (because goUp is a generator
function), then you don't use that generator object for anything.
More information about the Python-list