Hello,

> You say that "f.__pow__.__doc__ is a special read-only attribute",
> apparently even at the time when the code is generated. But for what
> reason? Is there really no way around?

There isn't really any way to make f.__pow__.__doc__ work for your
object.  The reason is that there is really no place where that
documentation string can be stored.  The C structures just don't have
a place for it.

If you want to make it accessible from the command-line, you could
modify the introspection code to try to find the appropriate
definition in the source file, but this is tricky and prone to error.

> So, let me resume my original question: Is there a way to at least get
> a *documentation* of __pow__?

The only documentation you can get for __pow__ on cdef classes is the
default one -- that is defined statically in Objects/typeobject.h of
the Python source code.

> Where can I learn more about method-wrapper?

A method wrapper is a basically a light wrapper around an underlying C
function.  I'm not sure where to find documentation on-line, but it's
all in the Python source code.  This is also very relevant:
http://docs.python.org/reference/datamodel.html

--Mike

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to