[Zope] Why pythonMethod forbids me cutting list?

2001-01-04 Thread Dirksen

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?

Dirksen



__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Why pythonMethod forbids me cutting list?

2001-01-04 Thread Evan Simpson

From: Dirksen [EMAIL PROTECTED]
 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


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )