Le vendredi 21 novembre 2014 20:35:47 UTC+1, Harald Schilly a écrit : > > > > Sure this answer by Sage is less cryptic: > > > > sage: p=Permutation([4,1,2,5,3]) > > sage: type(p) > > <class > 'sage.combinat.permutation.StandardPermutations_all_with_category.element_class'> > > > > but it prevents me (and perhaps others) from doing any development in > such a system :-( > > > > Hi, I am quite confused by this. Having a good type system at hand is > really helpful, in my opinion. What do you actually expect to get here > instead? > Oops, imho a permutation is a very elementary object, coding it is not so hard, so it's type should be ... Permutation ! Moreover the construction "Permutation([4,1,2,5,3])" suggests that this is the right way, and indeed:
sage: Permutation <class 'sage.combinat.permutation.Permutation'> whereas: sage: sage.combinat.permutation.StandardPermutations_all_with_category.element_class --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-8-3911cb09e3ce> in <module>() ----> 1 sage.combinat.permutation.StandardPermutations_all_with_category.element_class AttributeError: 'module' object has no attribute 'StandardPermutations_all_with_category' I'm somewhat aware of the motivations of those who "categorize" code for combinatorial objects, but yes I'm deterred by such complications, and imho that situation restricts Sage coding to a small circle. Put otherwise, basic *design decisions* about modules in Sage, when not straightforward, should be carefully discussed, in scientific documents. Instead we have cookbooks. I got other examples, eg trying using graphs, and discovering than building a 100x100 grid was surprinsingly time consuming: I am afraid that it denotes basic flaws in the definition of graphs in Sage. Amicalement -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.