[IronPython] compile bug

Michael Foord fuzzyman at voidspace.org.uk
Tue Mar 11 23:09:31 CET 2008

Hello guys,

There is a bug in the Python compile function relating to the
'PyCF_DONT_IMPLY_DEDENT' flag (which was added to support the standard
library 'code' module.

Python 2.5:

>>> compile('def f():\n    print "hi"\n\n', '<input>', 'single', 
<code object <module> at 011572F0, file "<input>", line 1>

IronPython 2a8
>>> compile('def f():\n    print "hi"\n\n', '<input>', 'single', 
  File "<input>", line 4

SyntaxError: invalid syntax

Unfortunately this prevents me implementing an interactive interpreter
in Silverlight 2 using code.InteractiveConsole. :-(

If there is *any* way this can be fixed in a version of dynamic 
silverlight then we can still have this for PyCon. ;-)

All the best,

Michael Foord

More information about the Ironpython-users mailing list