Hi sage-devel We just came across the following bizarre behaviour:
sage: F = GF(5) sage: F.list() [0, 1, 2, 3, 4] sage: F.list().remove(0) sage: F.list() [1, 2, 3, 4] sage: GF(5).list() [1, 2, 3, 4] Which means that the user has just forever destroyed GF(5) in this Sage session! This currently causes a bug in a decoding algorithm in sage.coding.linear_code. My first thought was to simply fix this behaviour with finite fields. But looking in sage/structure/parent.pyx:1356 it turns out that this behaviour is not only known but also tested for! In #10470, caching of list() was introduced and tested for exactly by modifying the returned list. Do people agree with me that this behaviour is crazy? And that the small penalty in returning a *copy* of the list in each call to list() is a small price to pay for mitigating user errors? Or do you agree with the authors of #10470 and that the current behaviour should be retained. Best, Johan -- 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 post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.