[sage-devel] Re: Right idiom to define a map

2019-03-13 Thread Kwankyu Lee
On Wednesday, March 13, 2019 at 9:04:32 PM UTC+9, Simon King wrote: > > PS: > > On 2019-03-13, Simon King > 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. > > > >

[sage-devel] Re: Right idiom to define a map

2019-03-13 Thread Simon King
PS: On 2019-03-13, Simon King 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

[sage-devel] Re: Right idiom to define a map

2019-03-13 Thread Simon King
Hi Kwankyu, On 2019-03-13, Kwankyu Lee wrote: > For pickling, you probably just need to implement a __reduce__ method for >> the map. >> > > Why not the category framework provide a default? This also seems to me a > defect of the category framework. I think of pickling as an implementation

[sage-devel] Re: Right idiom to define a map

2019-03-13 Thread Kwankyu Lee
> > What did I do wrong? Or what should I do more? To pass _test_pickling, it is enough to implement __eq__ method. This is reasonable! -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails

[sage-devel] Re: Right idiom to define a map

2019-03-12 Thread Travis Scrimshaw
On Wednesday, March 13, 2019 at 10:32:19 AM UTC+10, Kwankyu Lee wrote: > > The _test_category issue is something that shows up with every map (and I >> think homset). This is because the parent (i.e., the homset) does not >> (usually) have a single Element class, but the _test_category is

[sage-devel] Re: Right idiom to define a map

2019-03-12 Thread Kwankyu Lee
> > The _test_category issue is something that shows up with every map (and I > think homset). This is because the parent (i.e., the homset) does not > (usually) have a single Element class, but the _test_category is checking > that the map is a subclass of the element_class that is

[sage-devel] Re: Right idiom to define a map

2019-03-12 Thread Travis Scrimshaw
Hi Kwankyu, The _test_category issue is something that shows up with every map (and I think homset). This is because the parent (i.e., the homset) does not (usually) have a single Element class, but the _test_category is checking that the map is a subclass of the element_class that is