On Sun, 2008-04-20 at 12:42 -0400, Jim Fulton wrote: > On Apr 20, 2008, at 12:06 AM, Darryl Cousins wrote: > ... > > If I have understood the code correctly in zope.deferredimport the > > problem which zope.proxy.ProxyBase answers is in the following snippet > > from z.deferredimport.deferredmodule:initialize  where a > > type(module) > > comparison is made. > > > > Therefore, if I could understand fully Jim's statement: > > > > "the inspect module's assumption that a module is not a module > > unless it > > subclasses the standard Python module type" > > > > Then I could attempt to substitute pure-python code for the > > type(module) > > problem which appears in the `initialize` method. > > I'm not sure what you mean. The idea is to provide a pure-python > implementation of ModuleProxy. ModuleProxy doesn't have to be as > complete as zope.proxy allows. The need for a proxy is due to the > inspect module's use of isinstance. isinstance in turn uses an > object's __class__ attribute, which a proxy can override.
Yes, I was off track a little with my last mail. I did get that I need to replace ModuleProxy as you say. I'm trying to figure just what is required of the ModuleProxy class (if not to be as complete as zope.proxy.ProxyBase). I'm not doing very well with understanding _zope_proxy_proxy.c to even figure out what ProxyBase does provide. > I hope this hint helps. Well, yes. But I think the task may be beyond my level of understanding. Regards, Darryl > > Jim > > -- > Jim Fulton > Zope Corporation > _______________________________________________ Zope3-users mailing list Zope3firstname.lastname@example.org http://mail.zope.org/mailman/listinfo/zope3-users