On 10/23/05, Neil Schemenauer <[EMAIL PROTECTED]> wrote:
>
> I wonder if the old compiler and the compiler package get this right.

Minor variation on Armins code (move the %s from before the loop to
inside the loop):

longexpr = 'x = x or ' + '-x' * 2500
code = '''
def f(x):
    while x:
        %s
        %s
        %s
        %s
        %s
        %s
        %s
        %s
        %s
        %s
        x -= 1
        # EXTENDED_ARG/JUMP_ABSOLUTE here
    return x
''' % ((longexpr,)*10)

exec code
f(5)

Works in CVS (at least it seems to work), but in 2.4 produces:
  SystemError: com_backpatch: offset too large
_______________________________________________
Compiler-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/compiler-sig

Reply via email to