Dieter Maurer wrote:
Jim Fulton wrote at 2003-11-22 12:14 -0500:
... Also note that I had to get rid of the validateValue call. It's important that we always pass the name and container to code that needs to get roles.
We need "name" and "container" only for objects that do not have their own "__roles__" attribute. This essientially means for the newly implemented methods. But, for bound methods, we can determine name and container from the objects.
We can determine the container, but we can't reliably the name:
class Foo: ... def eeek(self): pass ... oook = eeek
Foo().oook.__name__ 'eeek'
I would therefore keep "validateValue" and try to determine container and name.
No can do. I'll note that validateValue is hardly every used, at least in the Zope CVS. We really *do* need to refactor this stuff. What we're doing now is a stop-gap measure. Before releasing 2.8, I want to try to design what we want in 2.9 and have 2.8 include warnings and other guidence that will help people get ready for 2.9. Jim -- Jim Fulton mailto:jim@zope.com Python Powered! CTO (540) 361-1714 http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org