[Zope] Why pythonMethod forbids me cutting list?

Evan Simpson evan@4-am.com
Thu, 4 Jan 2001 10:55:05 -0500


From: Dirksen <dirksen_lau@yahoo.com>
> These statements in python method:
>
> stock=[3,4]
> del stock[1]
>
> will cause this error:
>
> Error Type: Python Method Error
> Error Value: Forbidden operation DELETE_SUBSCR at line 2
>
> How is that?

Python Methods aren't smart enough to know that you created the list
yourself, and there's no security risk in allowing you to alter it.  Python
Scripts remove this limitation.

Cheers,

Evan @ digicool & 4-am