A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-May/073535.html below:

[Python-Dev] New Super PEP

[Python-Dev] New Super PEP [Python-Dev] New Super PEPDino Viehland dinov at exchange.microsoft.com
Thu May 31 00:46:28 CEST 2007
>>> 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.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4