On Tue, Aug 26, 2008 at 3:59 AM, Simon King <[EMAIL PROTECTED]> wrote:
>
> Dear Sage team,
>
> i am puzzled by the fact that introspection does not work for the hash
> method, while it works for other special methods.
>
> I applied Martin's patch for ticket #3724, which provides a new hash
> method for matrices over GF(2) and also contains examples in the doc
> string. But the doc string seems invisible for introspection:
>
> sage: M = MatrixSpace(GF(2),10000,10000).random_element()
> sage: M.__hash__?
> Type:           method-wrapper
> Base Class:     <type 'method-wrapper'>
> String Form:    <method-wrapper '__hash__' of
> sage.matrix.matrix_mod2_dense.Matrix_mod2_dense object at 0x31909e0>
> Namespace:      Interactive
>
> The same happens with
> sage: L=(1,2)
> sage: L.__hash__??
>
> The same also happens if i apply it to the hash methods of the
> extension classes that i created.
>
> Is it a bug of introspection?
> Martin suggested i shall open a ticket for it, but i wanted to ask
> here - perhaps i did something stupid, and the doc string is supposed
> to be gotten in a different way?
>

It might just be a limitation of Python.  I certainly have no clue how
to introspect on that method.  You can file a ticket, but I don't know if
it is even possible to resolve this.  It's definitely a shortcoming of
Sage/Python,
and having all such shortcomings systematically enumerated is a good
thing.

 -- William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to