On 30 August 2011 13:31, Jack Trades <jacktradespub...@gmail.com> wrote:
>
>
> On Tue, Aug 30, 2011 at 2:37 AM, Rob Williscroft <r...@rtw.me.uk> wrote:
>
>>
>> > That's brilliant and works flawlessly.  Thank you very much!
>>
>> If an impementation (as you say up thread) can populate globals
>> or locals with whatever they want, then how do you know that last
>> item added was the function definition the user supplied ?

That's not an issue. The last statement that is executed will be the
"def" statement.

>> Rob.
>
> I spoke a bit too soon with the "works flawlessly" post.  In addition to
> your issue, there is also the problem that supplying an empty environment
> does not allow the user to call necessary functions (like scheme_eval).

You could simply prepend the function definition string with whatever
imports are needed.

-- 
Arnaud
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to