28 Jul
2010
28 Jul
'10
5:58 p.m.
Scott Dial wrote:
Except now yield_if_true() is not a generator. So, you have two classes of "generators" now (top-level/delegated), which breaks all sorts of things.
Right, yield_if_true is a regular function, that's the whole point. There'd still only be one kind of generator, defined by the presence of the yield keyword. Nothing would break. The function that calls yield_if_true (or some other function up the call chain) would need to be a generator, if necessary made such using the traditional workaround if 0: yield regards, Anders