[Zope-dev] Waaagh! Python Script won't allow __setitem__
Chris Withers
chrisw@nipltd.com
Mon, 19 Feb 2001 17:08:11 +0000
Evan Simpson wrote:
>
> The only way that the security code can know that your __setitem__ is safe
> is to rename (or alias) it to __guarded_setitem__. Ditto for other such
> methods.
Cool :-) Hmmm... I'm sure __getitem__ works okay though ;-)
> > if type(x) == type(0):
>
> Use the Script builtin "same_type" instead:
>
> if same_type(x, 0):
> # Whatever
But what's so bad about type()?!
cheers,
Chris