sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.36k stars 462 forks source link

Improve documentation of CategoryObject #34540

Open mkoeppe opened 2 years ago

mkoeppe commented 2 years ago

CategoryObject introduces itself as "an object in some category", but this is highly ambiguous.

In this ticket, we update the documentation along the following lines:

Related:

CC: @tscrim @xcaruso @DavidAyotte

Component: categories

Issue created by migration from https://trac.sagemath.org/ticket/34540

mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -8,7 +8,7 @@
 - finally explain that an instance of (a subclass of) `CategoryObject` 
   - is a Python object 
   - that *has* a distinguished/default category as its attribute `_category` (returned by the method `category()`)
-  - that mixes in attributes/methods from that category.
+  - that mixes in attributes/methods from that category's `ParentMethods`.
 - conclude that "the same" mathematical object can be represented by several instances of (subclasses of) `CategoryObject` for the purpose of "considering it as an object of" the category. 

 Related: