[Zope3-dev] Nasty bugs
Shane Hathaway
shane@zope.com
Wed, 20 Mar 2002 10:38:46 -0500
Steve Alexander wrote:
> Guido van Rossum wrote:
>
>>
>> (2a) Why would None need to be wrapped?
>
>
> This opens up a larger problem, and one which Shane and I have been
> discussing at some length on IRC.
>
> If None is wrapped, we can't expect to use Zope3 directly with
> third-party modules that say:
>
> if foo is None:
>
> ..as, a wrapped None is not None.
Here's a thought. We need primitives that are mutable to sometimes be
wrapped, for example to prevent a list, returned from a function unaware
of security, from being mutated by untrusted code. But "None", numbers,
and strings probably shouldn't ever be wrapped. As for tuples, it's
hard to say.
Shane