Hi Nicolas B., Thank you for your comments (though I did not understand your second comment). I think I fixed the problem with the hashable input. However, now I am not sure about
ClonableList.__init__(self, parent, T) Is this allowed? I get the following error message: sage: strongTableau([[-1, -2, -3], [3]],2,[3] ) ERROR: An unexpected error occurred while tokenizing input The following traceback may be corrupted or invalid The error message is: ('EOF in multi-line statement', (163, 0)) --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) /Applications/sage-5.0.beta3/devel/sage-combinat/sage/combinat/<ipython console> in <module>() /Applications/sage-5.0.beta3/local/lib/python2.7/site-packages/sage/misc/classcall_metaclass.pyc in __call__(cls, *args, **options) 272 """ 273 if '__classcall_private__' in cls.__dict__: --> 274 return cls.__classcall_private__(cls, *args, **options) 275 elif hasattr(cls, "__classcall__"): 276 return cls.__classcall__(cls, *args, **options) /Applications/sage-5.0.beta3/local/lib/python2.7/site-packages/sage/combinat/k_tableau.pyc in __classcall_private__(cls, T, k, mu) 192 if mu is not None: 193 mu = tuple(mu) --> 194 return strongTableaux(k)(T, mu) 195 196 def _repr_(self): /Applications/sage-5.0.beta3/local/lib/python2.7/site-packages/sage/structure/parent.so in sage.structure.parent.Parent.__call__ (sage/structure/parent.c:7908)() /Applications/sage-5.0.beta3/local/lib/python2.7/site-packages/sage/structure/coerce_maps.so in sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args (sage/structure/coerce_maps.c:3729)() /Applications/sage-5.0.beta3/local/lib/python2.7/site-packages/sage/structure/coerce_maps.so in sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args (sage/structure/coerce_maps.c:3598)() /Applications/sage-5.0.beta3/local/lib/python2.7/site-packages/sage/combinat/k_tableau.pyc in _element_constructor_(self, lst, mu) 486 if not isinstance(lst, (list, tuple)): 487 raise TypeError, "Input should be a list or tuple." --> 488 return self.element_class(self, lst, mu) 489 490 def _repr_( self ): /Applications/sage-5.0.beta3/local/lib/python2.7/site-packages/sage/misc/classcall_metaclass.pyc in __call__(cls, *args, **options) 276 return cls.__classcall__(cls, *args, **options) 277 else: --> 278 return type.__call__(cls, *args, **options) 279 280 def __contains__(cls, x): /Applications/sage-5.0.beta3/local/lib/python2.7/site-packages/sage/combinat/k_tableau.pyc in __init__(self, parent, T, k, mu) 156 #tijseq = sTk.marked_CST_to_transposition_seq( T ) 157 tijseq = parent.marked_CST_to_transposition_seq(T) --> 158 ClonableList.__init__(self, parent, T) 159 markings = sorted([-v for v in flatten(list(T)) if v<0]) 160 if len(tijseq)<len(markings): /Applications/sage-5.0.beta3/local/lib/python2.7/site-packages/sage/structure/list_clone.so in sage.structure.list_clone.ClonableArray.__init__ (sage/structure/list_clone.c:3186)() /Applications/sage-5.0.beta3/local/lib/python2.7/site-packages/sage/structure/list_clone.so in sage.structure.list_clone.ClonableArray.check (sage/structure/list_clone.c:4906)() AssertionError: This should never be called, please overload Best, Anne On 2/24/12 12:58 AM, Nicolas Borie wrote: > Le vendredi 24 février 2012 à 00:30 -0800, Anne Schilling a écrit : >> Hi Florent, >> >> I changed this over to ClonableList, but still get the same error. Could you >> please have a look to see what is wrong. >> ----------------------------------------------------------- >> >> sage: strongTableau([[-1, -2, -3], [3]],2,[3] ) >> --------------------------------------------------------------------------- >> TypeError Traceback (most recent call last) > ...... >> >> TypeError: unhashable type: 'list' > > Hello, > > For a thirst element of answer (because i am not able to give a full > answer), as your the parent of your elements inherit from > UniqueRepresentation, you need to give hashable argument to the parent. > > So, when your code call strongTableux( bla, bli, blo, ...), all bla, bli > and blo must be hashable. This this reason, python list are not an > option here. You should convert them to tuple. > > I just try to run : > strongTableau( [[-1, -2, -3], [3]], 2, (3,) ) <-- tuple for the last > argument. > > You will see the error has change. But as I never read this code, I > don't really know if it is an advance or not... I hope this will help > you. > > Cheers, > Nicolas B. -- 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.