Hey Nicolas, I would say this is like matrices: do you want the iterator for matrices to iterate by default over all elements or rows? Currently the iterator goes over all rows and you can call M.list() to get a flat list of entries.
Actually, this is a question for graded objects in general: should the default iterator go over each graded component or all elements? I would say there should be methods for both. My thought is the default iterator being over graded components since each component might be infinite, but I don't have a good/strong opinion/reason for this. Best, Travis On Friday, July 11, 2014 7:24:25 AM UTC-7, Nicolas M. Thiery wrote: > > Hi path algebra fans! > > I am having doctests failures in #8678 because of the following > "feature" of quiver path algebras: > > sage: P = DiGraph({1:{2:['a']}, 2:{3:['b']}}).path_semigroup() > sage: A = P.algebra(GF(7)) > sage: A.list() > [Free module spanned by [e_1, e_2, e_3] over Finite Field of size > 7, > Free module spanned by [a, b] over Finite Field of size 7, > Free module spanned by [a*b] over Finite Field of size 7] > > And indeed ``A.__iter__`` states that it iterates over the homogeneous > components of A. This sounds bad, since the general convention for > parents is to have __iter__, list, ... iterate over its elements. And > indeed some code that makes this assumption explodes. > > Can we just rename this feature? Is it actually useful? > > Cheers, > Nicolas > -- > Nicolas M. ThiƩry "Isil" <nth...@users.sf.net <javascript:>> > http://Nicolas.Thiery.name/ > -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel. For more options, visit https://groups.google.com/d/optout.