#11166: Typo in initialization of FreeModule_generic_field
-------------------------------------+--------------------------------------
Reporter: nborie | Owner: nborie
Type: defect | Status: positive_review
Priority: major | Milestone: sage-4.7.1
Component: linear algebra | Keywords:
Work_issues: | Upstream: N/A
Reviewer: Kelvin Li, Rob Beezer | Author: Nicolas Borie
Merged: | Dependencies:
-------------------------------------+--------------------------------------
Description changed by rbeezer:
Old description:
> `base_field` became `base_ring`... it is very funny this bug never made
> things go bad.
>
> {{{
> sage: from sage.modules.free_module import FreeModule_generic_field
> sage: FreeModule_generic_field(QQ, 5, 5)
> Traceback (most recent call last):
> ...
> NameError: global name 'base_ring' is not defined
> }}}
>
> And in the code:
> {{{
> class FreeModule_generic_field(FreeModule_generic_pid):
> ...
> def __init__(self, base_field, dimension, degree, sparse=False):
> ...
> FreeModule_generic_pid.__init__(self, base_ring, dimension,
> degree, sparse=sparse)
> }}}
>
> As the creation is done with a factory, this bug is invisible from the
> user. But, if you want to build your own `FreeModule` over a field with
> category and some other stuff, calling the `__init__` of this class make
> me fall on the bug.
>
> Apply:
>
> 1. [attachment:trac_11166_FreeModule_generic_field-nb-v2.patch]
> 1. [attachment:trac_11166_doctest.patch]
New description:
`base_field` became `base_ring`... it is very funny this bug never made
things go bad.
{{{
sage: from sage.modules.free_module import FreeModule_generic_field
sage: FreeModule_generic_field(QQ, 5, 5)
Traceback (most recent call last):
...
NameError: global name 'base_ring' is not defined
}}}
And in the code:
{{{
class FreeModule_generic_field(FreeModule_generic_pid):
...
def __init__(self, base_field, dimension, degree, sparse=False):
...
FreeModule_generic_pid.__init__(self, base_ring, dimension,
degree, sparse=sparse)
}}}
As the creation is done with a factory, this bug is invisible from the
user. But, if you want to build your own `FreeModule` over a field with
category and some other stuff, calling the `__init__` of this class make
me fall on the bug.
Apply:
1. [attachment:trac_11166_FreeModule_generic_field-nb-v3.patch]
1. [attachment:trac_11166_doctest-v2.patch]
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11166#comment:9>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.