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/2003-March/033934.html below:

[Python-Dev] Capabilities

[Python-Dev] CapabilitiesSamuele Pedroni pedronis@bluewin.ch
Mon, 10 Mar 2003 19:53:08 +0100
From: "Jim Fulton" <jim@zope.com>
>
> Could you explain why you say that zope proxies are brittle?
>

from my small experience playing with RestrictedIntepreter:

you wrap into proxies a lot of builtins:

*) 'object' for example, then
class C(object): ... does not work

but given that some basic types are left alone, one can use
Type = ''.__class__.__class__

class C:
  __metaclass__ = Type

*) iter seems not to work (deliberate decision or bug?)
*) proxied 'property' is unusable
*) built-in functions return proxies even if the argument were unproxied:

_12 = map(None,[1,2])

class A: pass
a = A()
a.a = [1,2]

_12 = getattr(a,'a')

in both cases with the proxied version of map and getattr the result _12 would
be a proxied list.

deliberate safer-side decisions?

I can see it both ways:
- see other mail

- map(None,[obj])[0] becomes a way to get a a proxied version of obj that can
be passed to code that would maybe unwrap it and believe
that is some other legit object.

regards.










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