>>> Being able to access the calling frame from IronPython would be really >>> useful...
We do have a -X:Frames option but it's going to hurt your performance, but for example: IronPython 1.0.60816 on .NET 2.0.50727.312 Copyright (c) Microsoft Corporation. All rights reserved. >>> def f(): ... x = locals ... print x() ... >>> f() {'__name__': '__main__', '__builtins__': <type '__builtin__'>, '__doc__': None, 'site': <module 'site' from 'C:\Product\Released\IronPython-1.0\Lib\site.py'>, ' f': <function f at 0x000000000000002B>} >>> ^Z C:\Product\Released\IronPython-1.0>.\ipy.exe -X:Frames IronPython 1.0.60816 on .NET 2.0.50727.312 Copyright (c) Microsoft Corporation. All rights reserved. >>> def f(): ... x = locals ... print x() ... >>> f() {'x': <built-in function locals>} >>> ^Z But then we'll NEVER use the CLR stack for storing locals, but we can also always get the calling frames. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com