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/2002-December/031160.html below:

[Python-Dev] known obvious thing or bug (rexec)?

[Python-Dev] known obvious thing or bug (rexec)?Samuele Pedroni pedronis@bluewin.ch
Sat, 14 Dec 2002 16:29:27 +0100
latest CVS

Python 2.3a0 (#1, Dec 14 2002, 07:19:32)
[GCC 2.95.2 20000220 (Debian GNU/Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

consider

>>> import rexec
>>> r=rexec.RExec()
>>> r.r_exec("class C: pass\nC.a=0")
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/home/users/p/pe/pedronis/python/dist/src/Lib/rexec.py", line 309, in
r_
exec
    exec code in m.__dict__
  File "<string>", line 2, in ?
RuntimeError: classes are read-only in restricted mode

vs.

>>> r.r_exec("class C(object): pass\nC.a=0")
>>>

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