On Tue, 24 Jan 2006 21:19:26 +0100, Carl Cerecke wrote
(in article <[EMAIL PROTECTED]>):

> def g_on():
> 
>      print "on"
>      action = next_action()
>      if action == 'lift':
>          yield g_on()
>      elif action == 'push':
>          yield g_off()
>      else:
>          yield None
> 
> def g_off():
> 
>      print "off"
>      action = next_action()
>      if action == 'lift':
>          yield g_on()
>      elif action == 'push':
>          yield g_off()
>      else:
>          yield None

Amazing.

Executable pseudo-code, really. :-)

And that's even (run-time) efficient?

Tanks a lot,

Sincerely,

Wolfgang Keller

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

Reply via email to