[Python-Dev] New Super PEP (original) (raw)
Dino Viehland dinov at exchange.microsoft.com
Thu May 31 00:46:28 CEST 2007
- Previous message: [Python-Dev] New Super PEP
- Next message: [Python-Dev] Build problems with sqlite on OSX
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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': } ^Z
But then we'll NEVER use the CLR stack for storing locals, but we can also always get the calling frames.
- Previous message: [Python-Dev] New Super PEP
- Next message: [Python-Dev] Build problems with sqlite on OSX
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]