----- Original Message ----- From: "Tres Seaver" <tseaver@palladion.com>
That I can't even assign into a "local" mutable is a defect of PythonMethods, but one I'm not competent to fix (I'm CC'ing Evan on this one in case he knows of something better). The "update()" version works because it looks to bytecodehacks like a function call, which does the required magic in C.
A few months back I posted to Zope-dev an outline of how I can allow "local" mutable assignment if the user follows certain rules. I haven't implemented it yet, though it's high on my to-do list. It basically involves recognizing local names which are only ever bound to locally created lists and dicts, and allowing them to be mutated directly. Cheers, Evan @ 4-am & digicool