Re: [sage-combinat-devel] Global options for elements set by their parents

2012-11-05 Thread Nicolas M. Thiery
On Sun, Oct 28, 2012 at 06:50:19PM -0700, Travis Scrimshaw wrote: >On Sunday, October 28, 2012 2:13:07 AM UTC-7, Andrew Mathas wrote: >Not OK (this could break e.g. Symmetric Functions): > >sage: Partitions().options(cmp=dominance) > > In his patch Travis has an o

Re: [sage-combinat-devel] Global options for elements set by their parents

2012-10-28 Thread Travis Scrimshaw
Hey everyone, On Sunday, October 28, 2012 2:13:07 AM UTC-7, Andrew Mathas wrote: > > Hi Nicolas, > > Not OK (this could break e.g. Symmetric Functions): >> >> sage: Partitions().options(cmp=dominance) >> > > In his patch Travis has an option for changing the default comparison > method

Re: [sage-combinat-devel] Global options for elements set by their parents

2012-10-28 Thread Vincent Delecroix
Hi, For string representation, I think that it sould be a matter of the parent via a _repr_element_ method. This method is yet used in some classes. The issue may be fixed with the modification of Element.__repr__ as def __repr__(self): if self.__custom_name: return self.__custom_name

Re: [sage-combinat-devel] Global options for elements set by their parents

2012-10-28 Thread Andrew Mathas
Hi Nicolas, Not OK (this could break e.g. Symmetric Functions): > > sage: Partitions().options(cmp=dominance) > In his patch Travis has an option for changing the default comparison method and I think that this would be useful. Below you also mention that be able to change the default

Re: [sage-combinat-devel] Global options for elements set by their parents

2012-10-28 Thread Nicolas M. Thiery
On Sat, Oct 27, 2012 at 09:43:37PM -0700, Andrew Mathas wrote: > To do this within the framework I am thinking of it would probably be > necessary > to add an additional _options.defaults attribute to the parent which specifies > all of the options and their defaults. +1. You can grep through th

Re: [sage-combinat-devel] Global options for elements set by their parents

2012-10-27 Thread Andrew Mathas
> This looks in principle good. Is it possible to display which options are > set? > That might be useful since the user might not know what the default > options are > or might have forgotten which options were set. > To do this within the framework I am thinking of it would probably be

Re: [sage-combinat-devel] Global options for elements set by their parents

2012-10-27 Thread Nicolas M. Thiery
Hi Andrew! On Sat, Oct 27, 2012 at 05:43:08AM -0700, Andrew Mathas wrote: > Travis has is writing a nice patch #13605 which implements global options for > partitions. Among other things, these options determine how partitions are > printed (as lists, using exponential notation, compactly,

Re: [sage-combinat-devel] Global options for elements set by their parents

2012-10-27 Thread Anne Schilling
Hi Andrew, This looks in principle good. Is it possible to display which options are set? That might be useful since the user might not know what the default options are or might have forgotten which options were set. Best, Anne On 10/27/12 5:43 AM, Andrew Mathas wrote: > Travis has is writing