On Saturday, April 20, 2019 at 1:10:28 AM UTC+2, Andrew wrote:
>
> Set(['a', 'b', 'c'])
> gives different output with each sage session, at least when `sage` is
> compiled with python3.
>
Ideally Set._repr_ would try to sort the set members (falling back to
alphabetical order if the elements can't be compared). This is how the
plain-python set() works; The set members are unordered but the IPython
displayhook will sort them to obtain nicer output:
$ python
[...]
>>> set([1,2,320,6,210])
{320, 1, 2, 6, 210}
$ ipython
[...]
In [1]: set([1,2,320,6,210])
Out[1]: {1, 2, 6, 210, 320}
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.