On Tue, 17 Oct 2006 05:24:08 -0700, Martin Albrecht <[EMAIL PROTECTED]> wrote:
> > The constructor of an Ideal in ideal.py has the line > > gens.sort() # important! > > in it. Unfortunately the comment does not explain why it is important to > sort > the generators. hg reports the last change of this line > > http://sage.math.washington.edu/sage/hg/sage-main?fa=4df9be06dd7f;file=sage/rings/ideal.py > > as one of the changesets before we actually started using darcs so I > wonder > why this sorting is necessary? Maybe the author - William? - can > remember. Otherwise the generators will be in a completely random order, given the code that comes before that line. A basic design choice in SAGE is that as much as possible lists of objects (e.g., list(R), where R is finite), should not be in a random order. Feel free to add this as a comment. It would be fine to replace the sort by something else, if it yields the same answer. However, I don't think randomizing the orders of things, e.g., lists of generators, for no reason, is a good idea in SAGE. This is another "rule of thumb" for the programmer's guide. William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---