On Wednesday, April 9, 2014 2:45:39 AM UTC-7, Kevin Buzzard wrote:
>
> Thanks William and Nils!
>
> So now I can write better code than yesterday and, as John says, the only 
> remaining question is how someone with no sage experience is supposed to 
> work out for themselves that if R is a polynomial ring then R([1,2,3]) is 
> the way to create 3x^2+2x+1.
>

This is something we could do better on. I think "R?" would be a good place 
to display such facts. However, the only help displayed there is completely 
generic stuff from the category framework. The help from 
"R._element_constructor_?" is much more topical (although it doesn't happen 
to have the `R([1,2,3])` example, it could easily be added there), but that 
of course is completely non-discoverable.

The problem (and this hopefully can be fixed):

 - "R?" displays the docstring of the class itself, which could contain 
specific things (but presently doesn't because it is more concerned with 
construction of polynomial rings than with construction of elements in it)

 - "R?" also displays the docstring of `R.__call__`, because that WOULD 
normally be a good place to document element constructions. However, with 
the current coercion framework, the routine there tends to be a completely 
generic, technical thing that defers to `R._element_constructor_`, which 
does have specific documentation, but is completely undiscoverable.

Oddly enough, the more advanced parent, category, and coercion framework 
makes our documentation system worse.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to