On Dec 4, 2008, at 9:35 PM, pong wrote: > In SAGE 3.2.1 , the docstring of divisors says: > > Definition: divisors(n) > Docstring: > > Returns a list of all positive integer divisors > of the nonzero integer n. > > A second parameter may be passed to surpress sorting > of the list (as ordering the list can be more time > consuming then creating it). > > INPUT: > n -- the element > sorted -- whether or not to sort the output (default True) > > My question is how to get an unsorted output? > > I tried divisors(300, sorted=False) but SAGE complaints that divisors > only takes 1 argument. In fact, the source codes seem to suggest that > it will always return a sorted list.
You are correct, now the divisors are always returned sorted (as we have resolved the issue of sorting taking the majority of the time). The documentation needs to be fixed. http://trac.sagemath.org/sage_trac/ticket/4710 - Robert --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@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-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---