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 checking 
>> that the map is a subclass of the element_class that is dynamically created 
>> by the category framework. The standard idiom is just to skip these tests 
>> in the TestSuite() call.
>>
>
> If the issue is with every map, then a proper cure would be to fix the 
> category framework itself not to test _test_category or possibly by 
> dynamically creating a parent class whose element_class is the class of the 
> map. The standard idiom seems a bandage...
>
> I agree, but it is a complicated issue that has not seemed to have a real 
impact on the usability of the code (there are hooks in place to make the 
MorphismMethods work). How do you support multiple element classes for the 
parent (both syntax and implementation)? What about classes that might 
appear more dynamically (e.g., the identity function)? Part of the reason 
we add these skips to the TestSuite is to indicate that it is a technical 
debt and something we should eventually fix.
 

> 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.
>
> Actually, the Map class has a __reduce__ method implemented. Sorry, I 
forgot about that. However, it is something local to the branch/ticket, so 
I will comment there.

Best,
Travis

 
 

-- 
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.

Reply via email to