Yooooooooooooo ! > It does return a Cartesian product, but not without carrying as much structure as you might expect. It doesn't make sense to me to rename this -- as with other things in Sage, if it's not implemented, then you can request it or go ahead and do so yourself. I don't believe in making a more complicated situation when we want the current setup at the end of the day.
When all properties of cartesian products with respect to any structure will be known to Sage I agree with you, but in the meantime what we have is a method whose name is incorrect. If it were not inherited, you wouldn't create a method named "cartesian_products" for groups that only deals with its sets structure, it would be misnamed. You think that it is not misnamed because you think of code that does not exist. >> Now, permutation groups should have no base ring. Can it be fixed ? > > IDK off hand how difficult this would be. It depends upon how many old-style parents in Sage currently need that method. My guess is polynomial rings and free modules (http://trac.sagemath.org/ticket/10513 handles the modules case). Fundamentally it's an easy fix: remove the method and let it be inherited from the category. However everything needs to use categories correctly. Well, I am afraid that it will have to be done anyway. For base_ring and for base, gens_dict, gens_dict_recursive, get_action, has_base, .... Actually most of the methods of Parent have nothing to do there. > We need to append "finite" for the last method. However first() and next() are good to keep and differ from an_element(), which is recommended to return a non-trivial element and first() is usually trivial, and __iter__(), which doesn't get the next element in the numeration after a particular element. There may be very good reasons to have method to do just that, but you cannot create functions named like that in FiniteEnumeratedSet because these functions will be inherited by next to everything, and while these functions may be well named when your object is just a FiniteEnumeratedSet that meaning is lost when those functions are inherited by more complicate structure. first() also seems to be equivalent to .__iter__().next(). It is true that beginners won't think of that, but still, I don't think that this is a sufficient reason to have such a method everywhere. And you expect them to have some knowledge of Python anyway otherwise they will feel compelled to use next() repeatedly instead of iter(), for worse performances ... HMmmmmmmmm :-/ > This is now http://trac.sagemath.org/ticket/16718. I'll try to write a fix shortly. Thanks. I will go see if I can review it immediately ! Nathann -- 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.