[IronPython] IronPython 2: Oddity with Hosting API from within IronPython

Michael Foord fuzzyman at voidspace.org.uk
Sat Nov 1 22:01:02 CET 2008

Tomas Matousek wrote:
> I think nobody answered this question yet:
>>>> As a minor supplementary question, how do I get a reference to the
>>>> default ScriptScope on an engine? Is there any performance advantage in
>>>> using the default one, can I replace it, and does replacing it remove
>>>> any performance benefits we might have got? (OK, so strictly speaking
>>>> that wasn't just one question...)
> There is no default scope associated with an engine (other than Global scope on ScriptRuntime).
> All methods that operate on a scope yet don't take one create a new empty scope each time called.

Thanks. It turns out I was talking about the default scope on a compiled 
code object. We need to execute a lot of code in the same scope. Looks 
like we lose *some* of the advantage of compiling by not executing in 
the default scope of the compiled code.

All the best,


> Tomas
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


More information about the Ironpython-users mailing list