On 08/05/2010 01:25 AM, Brandon McCombs wrote:
> How can that be? I don't get any errors when the script 
> executes. Surely this isn't some limitation I'm encountering?
>
> <snipped code>
>               yield (p.destination - self.currenteFloor) * TRAVELTIME, self
               ^^^^^^^^^
To be succinct, goUp() is apparently a generator function.  "yield"
means the function needs to be iterated over; calling it just sets up
the generator and returns a generator object.  So yeah your goUp() call
will appear (and actually does) do nothing at all.


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to