in fact, you can see that sP=set(P) sP.add(g) len([t for t in sP])==len(P)+1
gets you True... On Fri, Dec 2, 2022 at 5:08 PM Dima Pasechnik <dimp...@gmail.com> wrote: > > On Fri, Dec 2, 2022 at 5:05 PM 'Martin R' via sage-devel > <sage-devel@googlegroups.com> wrote: > > > > OK, thank you, but is this really intentional? I would have thought that x > > in P and x in set(P) should give the same result. > I guess that hashing is done using a .parent()... > > > > > On Friday, 2 December 2022 at 16:57:50 UTC+1 dim...@gmail.com wrote: > >> > >> On Fri, Dec 2, 2022 at 2:44 PM 'Martin R' via sage-devel > >> <sage-...@googlegroups.com> wrote: > >> > > >> > a hashing problem, maybe? > >> > >> to me, is't a problem of different "types" (.parent(), to be precise. > >> See my reply on the ticket) > >> > >> > > >> > On Friday, 2 December 2022 at 15:43:33 UTC+1 Martin R wrote: > >> >> > >> >> I need help with https://trac.sagemath.org/ticket/34817 > >> >> > >> >> Essentially, I have a list P and an object g such that g in P but g not > >> >> in set(P). > >> >> > >> >> How could this happen? > >> > > >> > -- > >> > 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 sage-devel+...@googlegroups.com. > >> > To view this discussion on the web visit > >> > https://groups.google.com/d/msgid/sage-devel/3740834b-7ff2-478c-9ce5-0b33b439b157n%40googlegroups.com. > > > > -- > > 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 sage-devel+unsubscr...@googlegroups.com. > > To view this discussion on the web visit > > https://groups.google.com/d/msgid/sage-devel/566e74d7-638e-4baa-8f25-919bb20bb7e7n%40googlegroups.com. -- 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 sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq1gN3-SLVzfw4bE0x-u62%2BxSbDFk-s_t1uXdzx24PUivw%40mail.gmail.com.