Re: [IronPython] Global and Local ScriptScope

2009-01-06 Thread Caspar Lessing
this interface. > > > > Tomas > > > > *From:* users-boun...@lists.ironpython.com [mailto: > users-boun...@lists.ironpython.com] *On Behalf Of *Curt Hagenlocher > *Sent:* Tuesday, January 06, 2009 12:40 PM > *To:* Discussion of IronPython > *Subject:* Re: [IronPython]

Re: [IronPython] Global and Local ScriptScope

2009-01-06 Thread Tomas Matousek
PM To: Discussion of IronPython Subject: Re: [IronPython] Global and Local ScriptScope Scopes are intended for the language-implementation side of things. Languages like Ruby and Javascript support nested lexical scoping but Python does not. Even if we were to expose a mechanism in the hosting API

Re: [IronPython] Global and Local ScriptScope

2009-01-06 Thread Curt Hagenlocher
Scopes are intended for the language-implementation side of things. Languages like Ruby and Javascript support nested lexical scoping but Python does not. Even if we were to expose a mechanism in the hosting API that let you create ScriptScopes which reference nested Scopes, there's no guarantee t

Re: [IronPython] Global and Local ScriptScope

2009-01-06 Thread Caspar Lessing
You are right, it is basically a "from pricy_scope import *" for each one of my local scopes. I considered doing that, but decided against it as I'm really loathe to copy the context a whole bunch of times. The number of symbols _should_ not be excessive but the pricy_scope setup script is configu

Re: [IronPython] Global and Local ScriptScope

2009-01-06 Thread Curt Hagenlocher
How many symbols are there in this shared global context? Can't you just initialize them in one ScriptScope and then copy the symbols into the other ScriptScopes where you want to use them? This would be analogous to saying "from pricy_scope import *" at the beginning of each module. On Tue, Jan

[IronPython] Global and Local ScriptScope

2009-01-06 Thread Caspar Lessing
Hello People I use an embedded instance of IronPython. My program spends effort to create a global context. It then continues to to execute statements inside a local context which need resolve the items in the global context as well. Think of python functions' local context and its interaction wit