Hi, On Sun, Jan 10, 2010 at 2:06 AM, javier <vengor...@gmail.com> wrote: > Sorted it out, I had forgotten to import one file. Sorry for the > noise. Class patches nicely now; I am just having some test failures > due to different orderings of some output sets. Is there a standard > way of implementing tests that involve sets as outputs?
You should be aware there is no fixed ordering when you output the elements of a set. This is especially important when you have the string representation of all elements of a set as expected output in a doctest. For example, on some platform a set consisting of the elements 1, 2, 3 might be output in a different order such as 3, 2, 1. If the elements of your set can be sorted in some standard order, it might be a good idea to first sort the elements, then have the sorted elements be expected output of a doctest. A similar issue applies when you have the values of a dictionary as expected output in a doctest. > In a related matter, in the _set_ method, is it better to return a > python set or a sage Set? I don't know how to answer this question without knowing the (updated) code or the context of the code. -- Regards Minh Van Nguyen
-- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org