Christian Stump <christian.st...@gmail.com> writes: >> I also like that. One further (?) idea: >> >> .maps(codomain) >> >> could be a way to access all maps with the given codomain. (I don't >> know how one could specify the codomain however.) >> >> In particular, >> >> .maps(ZZ) >> >> would yield all integer valued statistics. > > The problem I see here is that whenever a method returns the same kind > of object, it is a map somehow. To organize the code, I would rather > restrict to (the obviously not strictly defined concepts of) > combinatorial maps and combinatorial statistics.
Yes, that was my intention. (Although every statistic is a map, I see that it possibly makes sense to have a special accessor for statistics.) > And having an optional argument has the problem that 1. the user must > know the codomain already and cannot easily search all maps to other > combinatorial objects and 2. that it is then a method and we have the > tab completion problem as Mike explained for the situation as for > symmetric functions. > > Or did you think of some other way to reach this? Yes - although I don't know whether it's possible. What I meant is that there is an attribute maps *and* a method with the same name maps. The argument of the method would *not* be optional. So x.maps. + Tab gives a list of all maps, while x.maps(Permutations) + Enter gives a list of all maps that yield permutations, or something that can be naturally (!) coerced to a permutation. I guess this would only make sense if there are lots of maps at some point. Martin -- 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.