Program calling unwanted functions

John Gordon gordon at panix.com
Mon Dec 22 15:09:53 EST 2014


In <b37a93ec-c90b-4375-a264-e96c3128871b at googlegroups.com> Luke Tomaneng <luketomaneng at gmail.com> writes:

> The "cameraman" function restarts itself when it ends, and the "kid"
> function calls "instructions()." Does anyone know why?

The cameraman function restarts itself because ... that's what you told it
to do.  As far as I can see, every possible logic branch ends up with a
call to cameraman().

The kid function doesn't call instructions, but the last line of your
script does call it, unconditionally.

-- 
John Gordon         Imagine what it must be like for a real medical doctor to
gordon at panix.com    watch 'House', or a real serial killer to watch 'Dexter'.




More information about the Python-list mailing list