#9016: make morphisms hashable
-----------------------------+----------------------------------------------
Reporter: burcin | Owner: AlexGhitza
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-4.5
Component: algebra | Keywords:
Author: Burcin Erocal | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-----------------------------+----------------------------------------------
Changes (by davidloeffler):
* status: positive_review => needs_work
Comment:
This patch causes a doctest failure on vanilla Sage 4.5.alpha1:
{{{
sage -t "devel/sage-reviewing/sage/modules/fg_pid/fgp_module.py"
**********************************************************************
File "/storage/masiao/sage-4.5.alpha1/devel/sage-
reviewing/sage/modules/fg_pid/fgp_module.py", line 383:
sage: Q._coerce_map_from_(V.scale(2))
Exception raised:
Traceback (most recent call last):
File "/storage/masiao/sage-4.5.alpha1/local/bin/ncadoctest.py", line
1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/storage/masiao/sage-4.5.alpha1/local/bin/sagedoctest.py",
line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename,
compileflags)
File "/storage/masiao/sage-4.5.alpha1/local/bin/ncadoctest.py", line
1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_7[11]>", line 1, in <module>
Q._coerce_map_from_(V.scale(Integer(2)))###line 383:
sage: Q._coerce_map_from_(V.scale(2))
File "/storage/masiao/sage-4.5.alpha1/local/lib/python/site-
packages/sage/modules/fg_pid/fgp_module.py", line 388, in
_coerce_map_from_
return bool(self._V._coerce_map_from_(S))
File "element.pyx", line 741, in
sage.structure.element.Element.__nonzero__ (sage/structure/element.c:5731)
File "element.pyx", line 863, in
sage.structure.element.Element.__richcmp__ (sage/structure/element.c:7107)
File "element.pyx", line 835, in
sage.structure.element.Element._richcmp (sage/structure/element.c:6989)
File "/storage/masiao/sage-4.5.alpha1/local/lib/python/site-
packages/sage/modules/matrix_morphism.py", line 111, in __cmp__
return cmp(self.matrix(), other.matrix())
File "element.pyx", line 306, in
sage.structure.element.Element.__getattr__ (sage/structure/element.c:2632)
File "parent.pyx", line 268, in
sage.structure.parent.getattr_from_other_class
(sage/structure/parent.c:2835)
File "parent.pyx", line 170, in
sage.structure.parent.raise_attribute_error (sage/structure/parent.c:2602)
AttributeError: 'sage.categories.morphism.CallMorphism' object has no
attribute 'matrix'
**********************************************************************
1 items had failures:
1 of 12 in __main__.example_7
***Test Failed*** 1 failures.
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9016#comment:5>
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.