Commits

Mark Shannon committed 64abedb Draft

Add assertion about state at exit

  • Participants
  • Parent commits 9d434d0

Comments (0)

Files changed (1)

File Python/recording_interpreter.c

         retval = NULL;
 
 fast_yield:
+    assert(why != WHY_RETURN || f->f_iblock == 0);
     if (co->co_flags & CO_GENERATOR && (why == WHY_YIELD || why == WHY_RETURN)) {
         /* The purpose of this block is to put aside the generator's exception
            state and restore that of the calling frame. If the current