[Zope3-dev] Riddle: zope.interface versus zope.formlib

Stephan Richter srichter at cosmos.phy.tufts.edu
Thu Aug 24 05:59:28 EDT 2006


On Wednesday 23 August 2006 19:13, Lennart Regebro wrote:
> On 8/23/06, Stephan Richter <srichter at cosmos.phy.tufts.edu> wrote:
> > If you ask zope.formlib (form.py, line 227)::
> >
> >   # Adapt context, if necessary
> >   interface = field.interface
> >   ...
> >   adapter = interface(context)
> >
> > Here the answer would be: <InterfaceClass __main__.IBar>
>
> This seem like superfluous information to me. You can get that
> information from the field. I don't see what use it would be to store
> it on the attribute.

This example clearly shows that it is not superfluous information. And if so, 
why does Python store im_class on a method? I think this needs much more 
thought than your response suggests.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training


More information about the Zope3-dev mailing list