[Python-Dev] Non-string keys in namespace dicts

Guido van Rossum guido at python.org
Tue Dec 4 00:51:17 CET 2007


On Dec 3, 2007 3:48 PM, Phillip J. Eby <pje at telecommunity.com> wrote:
> Actually, you're missing the part where such evil code *can't* muck
> things up for class dictionaries.  Type dicts aren't reachable via
> ordinary Python code; you *have* to modify them via setattr.  (The
> __dict__ of types returns a read-only proxy object, so the most evil
> rich compare you can imagine still can't touch it.)

What's to prevent that evil comparison to call setattr on the class?

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


More information about the Python-Dev mailing list