Re: [sage-devel] Re: doctests: non-sorted output

2017-09-09 Thread David Roe
On Sat, Sep 9, 2017 at 11:15 AM, Maarten Derickx < m.derickx.stud...@gmail.com> wrote: > Thanks for your input David. We discussed it on trac, and decided to leave > the situation as is on python 2.7 because it is stable enough as is given > the pynormaliz fix. > > For python 3 we propese to fix t

Re: [sage-devel] Re: doctests: non-sorted output

2017-09-09 Thread Maarten Derickx
Thanks for your input David. We discussed it on trac, and decided to leave the situation as is on python 2.7 because it is stable enough as is given the pynormaliz fix. For python 3 we propese to fix the sorting in upstream ipython. Using str based sort only if the standard sorting raises an er

Re: [sage-devel] Re: doctests: non-sorted output

2017-09-04 Thread David Roe
Given the transition to Python 3, I don't think we should directly compare the elements in a set (though perhaps an exception should be made if they all have the same parent). Comparing their string representations seems better. If we do sort the string representation of sets, we can reduce surpr

[sage-devel] Re: doctests: non-sorted output

2017-08-29 Thread Maarten Derickx
Option 2.3 might be to make solution 2.1 optional and dependent on the presence of something like # unorderedset in the doctest. I actually like this the best since it allows us to use it only in the cases where it is really needed. So we can have the advantages of 2.1 and 2.2 depending on the

[sage-devel] Re: doctests: non-sorted output

2017-08-29 Thread Maarten Derickx
The output of both dict and set are ordered by a display hook from IPython, the problem is that this sorting is done on the basis of __cmp__ and the default way of sorting using __cmp__ is using the id of an object which is not deterministic, so even though the output is sorted it is done on a