On Wednesday, March 13, 2019 at 9:04:32 PM UTC+9, Simon King wrote: > > PS: > > On 2019-03-13, Simon King <simon...@uni-jena.de <javascript:>> wrote: > > There are of course cases in which a default pickling mechanism makes > > sense (think of UniqueRepresentation). However, I think that Map is > > not such a case. > > > > Namely, a map is given by a domain, a codomain, and defining data. There > > could of course be a default implementation of pickling, namely: Provide > > a slot for the data (the domain and codomain are referenced anyway, > > although some of the references are weak references). > > To be clearer: I do think that a default implementation (of course not > in the category framework but in the base class) is *possible*. But I > also think that it would not be reasonable. >
Travis pointed out that for my case a default implementation of pickling is defined in the base class of Map. I agree that implementation of pickling is not a business of the category framework. _test_pickling tests if loads(dumps(obj)) == obj. It is defined for all sage object, and I guess any sage object is expected to pass the test. In my original post, the code did not implement __eq__, and hence the _test_pickling fails. I am perfectly fine with this. There is no problem here. -- 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.