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/2006-July/067254.html below:

[Python-Dev] Capabilities / Restricted Execution

[Python-Dev] Capabilities / Restricted Execution [Python-Dev] Capabilities / Restricted ExecutionPhillip J. Eby pje at telecommunity.com
Tue Jul 11 16:56:22 CEST 2006
At 03:36 AM 7/11/2006 -0700, Talin wrote:
>I thought a little bit more about Guido's comment that you can hide
>Python objects in a C wrapper class. However, as I was trying to sleep,
>I realized that you don't even need C to do it.
>
>The trick is to store the object reference as a closure variable.
>Assuming that there's no mechanism to directly access such variables,
>you can effectively have 'private' variables.

A function's func_closure contains cell objects that hold the 
variables.  These are readable if you can set the func_closure of some 
function of your own.  If the overall plan includes the ability to restrict 
func_closure setting (or reading) in a restricted interpreter, then you 
might be okay.

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