On 30 August 2011 22:48, Rob Williscroft <r...@rtw.me.uk> wrote:
> Arnaud Delobelle wrote in
> news:CAJ6cK1YVi3NQgdZOUdhAESf133pUkdazM1PkSP=p6xfayvo...@mail.gmail.com in
> gmane.comp.python.general:
>
>> 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.
>
> You don't know that, an implementation may for example set __bultins__
> to None, prior to returning, its not an unreasonable thing to do and
> the docs don't say they can't.

I haven't studied the docs but I'm certain that such an implementation
would break a lot of code.

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

Reply via email to