[Zope] - Re: ExtensionClass/__of__ credit

Phillip J. Eby pje@telecommunity.com
Tue, 08 Dec 1998 15:22:34 -0500


At 03:34 PM 12/8/98 +0000, Jim Fulton wrote:
>
>I happen to agree with you that __of__ an extremely useful protocol
>that is a natural extension of Python's method mechanism.  I feel
>as though I've been a lone voice in the wilderness advocating it.
>
>Are you a member of the types-sig,
>http://www.python.org/sigs/types-sig/
>?  That would be a good place to champion __of__.
>I think there's been some relevant discussion there, but I've been
>to busy with Zope to pay attention. :(
>

Thanks for the pointer.  It looks like I'm going to have to gird up my
brains and dig through the meta-ness, because it looks like these guys are
struggling with problems I've been working on with ASDF, and have mostly
solved through appropriate kinds of wrappers and appropriately implemented
__of__ methods.  About the only wrinkle I have left to solve, is that when
you access an ASDF class folder directly through a publisher such as
ZPublisher, methods currently end up bound to the class and don't know
they're not attached to an instance.  What you want is to edit the method
object itself, and so its 'default behavior' should be to present a
management interface when bound directly to the class.  Or at the least, it
should not merrily try to execute upon the class.  :)  Perhaps the simplest
way to deal with this is going to be to make index_html a ComputedAttribute
for method-like objects that are also themselves manage-able.

Anyway, never mind all that, I'm gonna go read up on the types-SIG and see
if I can further champion the __of__ cause (cause __of__?).