You need to call next or the code in the generator won't run at all.

class foo:

   def f0(self, s):
      print s

   def f1(self, s):
      print "not " + s
      yield 1

   def run(self):
      handlers={0 : self.f0, 1 : self.f1}
      handlers[0]('good')
      handlers[1]('good').next()

bar = foo()
bar.run()


That prints "good" then "not good".

dynamic call of functions and generator function (python)
I am currently designing an electronic board and i got a question:

Do you know if there is any device in which are integrated an RTC, an EEPROM and a battery? I heard about this type of device (i think it is called Time keeper) but I can't find any.

Thank you
