[Python-bugs-list] [ python-Bugs-711268 ] A large block of commands after an "if" cannot be compiled
SourceForge.net
noreply@sourceforge.net
Fri, 28 Mar 2003 02:47:16 -0800
Bugs item #711268, was opened at 2003-03-28 11:47
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=711268&group_id=5470
Category: Parser/Compiler
Group: Python 2.2.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Bram Moolenaar (vimboss)
Assigned to: Nobody/Anonymous (nobody)
Summary: A large block of commands after an "if" cannot be compiled
Initial Comment:
A Generated Python script Contains the code:
if 1:
file = bugreport.vim
... long list of commands ....
Executing this code with:
exec cmds in globals(), globals()
Results in the error:
SystemError: com_backpatch: offset too large
Looking into the code for com_backpatch() it appears
that the code is more than what can be jumped over.
Possible solutions:
1. When there is too much code, use another jump
statement that allows for a larger offset.
2. Always use a jump statement with a large offset
3. When "if 1" is used, don't generate a jump
statement (not a real fix, but works for the situation
where I ran into the bug).
It looks like this bug exists in all versions of Python.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=711268&group_id=5470