[Zope3-dev] Security: Do not compare symbolic constants with persistent data using "is"
Steve Alexander
steve@cat-box.net
Sun, 17 Feb 2002 12:32:13 +0000
Chris Withers wrote:
>
> How about using symbolic constants and then using equality?
I take it that you mean 'identity' here.
> Numbers are probably gonna be quicker in execution than strings or other
> objects.
That's a good point. These constants will be compared an awful lot.
Also, I suspect that numbers would be easier to implement in C, for when
the time comes to optimise the security systems.
--
Steve Alexander