Hi there, [...] > SetPartitions('aabcd', [3,2]).cardinality() > /// > Traceback (most recent call last): [...] > SetPartitions('aabcd').list() > /// > Traceback (most recent call last): [...]
Thanks Harald for reporting that. I took care of tracking down the bug. It can be "solved" by just removing a "Set" !!! However, I have a design question: I don't know how to return a sensible results: According to the doc: sage: s = SetPartitions('aa') Models the set-partition of a *two* element set {a1, a2} where the two a are different. So that, sage: s.cardinality() 2 And sage: s.list() Should return [{{'a1', 'a2'}}, {{'a1'}, {'a2'}}] However since the two 'a' are by no means different, I've no way to prevent sage to simplify {{'a', 'a'}} in {{'a'}} and {{'a'}, {'a'}} in {{'a'}} I see two solutions: 1) change the interface and forbid the input of string with repeated letters 2) add an option to returns the partitions as list of list. The user must turn this option on if he wants a sensible result in the case of repeated letters. So my question is: are there any use case for option 2 ? Any other suggestions ? Cheers, Florent -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org