#16644: LinearCode.cardinality category breakage
-------------------------------------+-------------------------------------
Reporter: ppurka | Owner:
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-6.3
Component: coding theory | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/ppurka/ticket/16644 | 4ccae66296a47a62daf12fc8a6662439e6183f35
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by tscrim):
I believe it's because it's not a new style parent and it doesn't properly
initialize its category:
{{{#!python
class LinearCode(module.Module_old):
def __init__(self, gen_mat, d=None):
ParentWithGens.__init__(self, base_ring)
}}}
and in `Module_old`:
{{{#!python
def category(self):
"""
Return the category to which this module belongs.
"""
# Defining a category method is deprecated for parents.
# Instead, the category should be specified in the constructor.
# See: http://sagetrac.org/sage_trac/wiki/CategoriesRoadMap
if self._is_category_initialized():
return Parent.category(self)
from sage.categories.modules import Modules
return Modules(self.base_ring())
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/16644#comment:13>
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.