[Zope-CMF] what's _implicit__name__?
Shane Hathaway
shane@zope.com
Fri, 12 Oct 2001 11:04:08 -0400
seb bacon wrote:
> I'm doing some introspection on class methods in the CMF; however,
> some of them are workflow-wrapped methods. I notice that such methods
> have an _implicit__name__ attribute, as well as WorkflowCore-supplied
> _id and _m attributes (which refer to the 'real' method).
>
> What would the best, most generic way of making sure I get the 'real'
> method be? Does _implicit__name__ imply a wrapped method? Or does
> 'wrapping' only exist in specific forms such as WorkflowMethod, rather
> than a generalised format?
_implicit__name__ is actually found in App/class_init.py and its purpose
is to warn you when you're using security declarations ambiguously. It
doesn't really have anything to do with wrapping.
I'm not sure that there is a generic way to unwrap wrappers like these,
though maybe you can achieve what you want by making WorkflowMethods
more closely emulate the methods they wrap. You could provide __doc__,
func_code, func_defaults, etc.
Shane