On 7/6/06, Max M <maxm@mxm.dk> wrote:
This code below works in plain Python. But when I add them to my zope class, and run the tester() method I get an "Attributer Error: __ac_local_roles__"
Descriptors in general are not guarantteed to work on old-style classes. Your PropTest class certainly looks like it falls into that category (I'm assuming you didn't elide anything for brevity), so I wouldn't expect it to work. That said, reading such a descriptor will work for classic classes. The real error is getting masked, however: it's not that __ac_local_roles__ isn't defined, it's that __mxm__ac_local_roles__ isn't defined, and the getter isn't dealing with that effectively (or, it is, depending on your opinion). -Fred -- Fred L. Drake, Jr. <fdrake at gmail.com> "Every sin is the result of a collaboration." --Lucius Annaeus Seneca