#18361: CategoryObject: always cache gens_dict
-------------------------------------+-------------------------------------
Reporter: jdemeyer | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.7
Component: categories | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/jdemeyer/categoryobject__always_cache_gens_dict|
9154c9fd6f3d5df75e84e80cd2f1446909658915
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by jdemeyer):
* status: needs_info => needs_review
Comment:
Replying to [comment:7 vdelecroix]:
> The class `ParentWithGens` is deprecated! There is no need for an
attribute `_gens_dict` on all category objects. Why `Partitions` or
`Integers` should have a method `gens` or `_gens_dict` attribute?
On the other hand, does it really hurt to have this extra attribute? We
already have these attributes on `CategoryObject`:
{{{
cdef class CategoryObject(SageObject):
cdef _generators
cdef _category
cdef public _base
cdef public _cdata
cdef public _names # will be _printer
cdef public _factory_data
cdef object __weakref__
cdef long _hash_value
}}}
The point is: `CategoryObject` already has functions dealing with
generators, such as the `_populate_generators_()` method. So why not
`gens_dict()` then?
And my proposed patch is actually compatible with the deprecation of
`ParentWithGens`, since it ''removes'' something from `ParentWithGens`.
--
Ticket URL: <http://trac.sagemath.org/ticket/18361#comment:11>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.