On 10/31/12 12:12 AM, Andrew Mathas wrote:
> As a follow-up, since Nicolas suggested that what I was proposing looked more 
> like options for arbitrary sage objects, so I experimented with adding my 
> options method to SageObject. Following Anne's
> suggestion, I also added a way of printing out the default options.
> 
> Even though SageObject is implemented in cython, from the few quick checks 
> that I made, my generic options code seemed to well for arbitrary sage 
> objects.
> 
> Of course, there is a catch: it didn't work quite the way that I wanted it to 
> because the multiple inheritance issues flagged above do cause problems. 
> Consider:
> 
> sage: t=Tableau([[1,2,3],[4,5]]);t       # create two tableaux
> [[1, 2, 3], [4, 5]]
> sage: s=Tableau([[1,1,1],[3,5]]); s
> [[1, 1, 1], [3, 5]]
> 
> sage: t.options()    # with no arguments print all current options and their 
> defaults
> The current options for Tableaux_all_with_category.element_class are:
>   display = str    (default str)
> sage: t.options(display="compact")   # change the display option to compact
> sage: t                                               # change of option 
> affects t
> 1,2,3/4,5
> sage: s                                             # change affects 
> previously created objects               1,1,1/3,5
> sage: Tableau([[1,2,4],[3,5]])             # change affects newly created 
> objects
> 1,2,4/3,5
> 
> sage: u=StandardTableau([[1,2,4],[3,5]]); u  # change does NOT affect u :(
> [[1, 2, 4], [3, 5]]
> sage: u.options()
> The current options for StandardTableaux_all_with_category.element_class are:
>   display = str    (default str)
> 
> The last example is, for me, a problem: the option change does NOT affect 
> classes which inherit from Tableau. I would prefer that it did, although in 
> some cases this is the behaviour you would want.

Hi Andrew,

I agree in this case it would be much preferable to have the same output for
Tableaux and StandardTableaux. I do not (yet) know how to fix this though.

Anne

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.

Reply via email to