[Zope3-dev] Nasty bugs

Guido van Rossum guido@python.org
Wed, 20 Mar 2002 13:15:08 -0500


> What does code typically compare by identity? Here's the ones I can 
> think of:
> 
>   * Things the code has itself created
> 
>   * Classes / types
> 
>   * None
> 
>   * Small integers

Eek!  Don't ever do this!!!  That's just an optimization, not a
guarantee of thelanguage.

>   * The empty tuple

Ditto!!!

> The only one of those that is mutable that we might need to worry
> about is "Classes / types".

Yup, you don't want untrusted code modifying types/classes.

--Guido van Rossum (home page: http://www.python.org/~guido/)