Thierry wrote:
> However, mixing the internal order of a common class when it exists
> together with id() would loose the transitivity property, so i guess
> those two kind of tests should remain separate.
I'm not sure I follow you: doesn't what cmp() does (if I understand
right: use the internal
Travis Scrimshaw wrote:
>> Sorry, I don't understand your example: I think everyone agrees that
>> ZZ == QQ should be False, but many people think that ZZ(1) == QQ(1)
>> should be True (though I personally disagree), and my post only was
>> about Elements.
>
> One potential side effect of what you
On Mon, Dec 05, 2016 at 05:46:32PM +0100, Marc Mezzarobba wrote:
> Nils Bruin wrote:
> > Yes, there is one in python in general. With
> >
> > sort(, key=str)
> >
> > you'll be able to sort lists of all kinds of stuff.
>
> Well, sort(key=str) and sort(key=id) certainly help in many cases, but
> t
Nils Bruin wrote:
> Yes, there is one in python in general. With
>
> sort(, key=str)
>
> you'll be able to sort lists of all kinds of stuff.
Well, sort(key=str) and sort(key=id) certainly help in many cases, but
they clearly don't suffice in general. Neither is able to use an order
defined by th
On Monday, December 5, 2016 at 12:35:47 AM UTC-8, Marc Mezzarobba wrote:
>
> Frédéric Chapoton wrote:
> > There is currently an effort being made (by me and a few referees) to
> > get rid of cmp() in all pyx files.
>
> Is there already a replacement for cmp() in Sage (i.e., something that
> all
Thierry wrote:
> Note that there are not only "mathemathical" orderings, but also
> "algorithmic" ones. It is useful (and i bet assumed in various Sage
> algorithms) to be able to totally order any pair of Python objects,
> e.g. when you want to traverse a graph, or even identify edges:
>
> sage:
On Mon, Dec 05, 2016 at 08:04:11AM +0100, Jeroen Demeyer wrote:
> On 2016-12-04 19:39, Marc Mezzarobba wrote:
> >Hi,
> >
> >Does Element.__richcmp__() (via CoercionModel_cache_maps.richcmp())
> >really need to fall back on comparing by type/id when no common parent
> >is found?
>
> No. As far as I
> > We need to be very careful about defining "not knowing". I (stongly)
> > believe when the objects/types are incomparable (say the rings ZZ and
> > QQ), then == should return False and != should return True.
>
> Sorry, I don't understand your example: I think everyone agrees that
> ZZ == Q
Hi from me. My (more recent) experience is similar but not identical. I
install sage from the ppa and I am having problems. Sage loads and seems to
be working, but:
┌┐
│ SageMath version 7.3, Release Date: 2016-08-04
On Mon, Dec 05, 2016 at 10:43:03AM +0100, Erik Bray wrote:
> On Sat, Dec 3, 2016 at 12:55 PM, Thierry
> wrote:
> > Hi,
> >
> > On Sat, Dec 03, 2016 at 10:00:51AM +0100, Jeroen Demeyer wrote:
> >> On 2016-12-02 09:21, Thierry wrote:
> >> >Would it be
> >> >preferable to have this possibility dealt
On Sat, Dec 3, 2016 at 12:55 PM, Thierry
wrote:
> Hi,
>
> On Sat, Dec 03, 2016 at 10:00:51AM +0100, Jeroen Demeyer wrote:
>> On 2016-12-02 09:21, Thierry wrote:
>> >Would it be
>> >preferable to have this possibility dealt at configure time
>>
>> Absolutely. Whatever you do, do *NOT* introduce a n
Frédéric Chapoton wrote:
> There is currently an effort being made (by me and a few referees) to
> get rid of cmp() in all pyx files.
Is there already a replacement for cmp() in Sage (i.e., something that
allows one to sort arbitrary objects--say, for printing them--and calls
_cmp_() in the case o
12 matches
Mail list logo