Michal Kwiatkowski wrote:
The first generator isn't finished, it yielded 1 and None. Second one is exhausted after yielding a single value (1). The problem is that, under Python 2.4 or 2.3 both invocations will generate the same trace output.
This seems to be a deficiency in the trace mechanism. There really ought to be a 'yield' event to distinguish yields from returns. You could put in a feature request on python-dev concerning this. -- Greg -- http://mail.python.org/mailman/listinfo/python-list