Dear all,

I am trying to understand how we want to document parents and elements.  As 
an example, consider a user trying to construct a matrix or a polynomial as 
follows.

sage: MatrixSpace?
sage: PolynomialRing?

yields the class docstring or the class factory, which indeed contains 
documentation on how to construct a MatrixSpace or PolynomialRing.  
Everything is looking fine here.  So let's do that:

sage: M = MatrixSpace(QQ, 3)
sage: P.<x> = PolynomialRing(QQ)

Now, how do we construct elements?  I would expect that

sage: M?
sage: P?

tells me that, but this is not the case.  The former again gives the class 
docstring, the latter gives the Call docstring (which at least points to 
_element_constructor_).

I cannot imagine that a user would actually get the idea of typing

sage: M._element_constructor_?
sage: P._element_constructor_?

So I have the following questions:

1) is there an obvious way to obtain the documentation on how to create 
elements which I overlooked?
2) if not so, is there a way to improve the situation?

In any case, I am guessing that for new structures, this information should 
still be provided in the _element_constructor_ method.

Best wishes,

Martin

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/sage-devel/996590d0-5c8d-4a3f-9927-c35a510c116fn%40googlegroups.com.

Reply via email to