[Python-Dev] KeyboardInterrupt on Windows

Raymond Hettinger python@rcn.com
Fri, 30 May 2003 17:23:47 -0400


> On Fri, May 30, 2003 at 04:40:00PM -0400, Neal Norwitz wrote:
> > On Fri, May 30, 2003 at 04:35:53PM -0400, Guido van Rossum wrote:
> > > I received this problem report (Kurt is the IDLEFORK developer).  Does
> > > anybody know what could be the matter here?  What changed recently???
> > 
> > >        while 1: pass
> > > 
> > > doesn't respond to a KeyboardInterrupt on Python2.3b1 on either
> > > WinXP or W2K.
> 
> The patch below fixes the problem by not optimizing while 1:pass.  

That looks like a good fix to me. 

There are two other ways:
*   disable the goto fast_next_opcode for JUMP_ABSOLUTE
*   disable the byte optimization for a jump-to-a-jump


Raymond