Hi,
The snippet D = CombinatorialFreeModule(ZZ, [1,2]) D(0) works fine, however C = CombinatorialFreeModule(ZZ, [1,2], category=AlgebrasWithBasis(ZZ)) C(0) gets into an infinite loop: File "/opt/sagemath-9.0/local/lib/python3.7/site-packages/sage/categories/magmas.py", line 488, in one return self(1) File "sage/structure/parent.pyx", line 900, in sage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9218) return mor._call_(x) File "sage/categories/map.pyx", line 1694, in sage.categories.map.FormalCompositeMap._call_ (build/cythonized/sage/categories/map.c:11607) x = f._call_(x) File "sage/categories/morphism.pyx", line 549, in sage.categories.morphism.SetMorphism._call_ (build/cythonized/sage/categories/morphism.c:8489) cpdef Element _call_(self, x): File "sage/categories/morphism.pyx", line 568, in sage.categories.morphism.SetMorphism._call_ (build/cythonized/sage/categories/morphism.c:8439) return self._function(x) File "/opt/sagemath-9.0/local/lib/python3.7/site-packages/sage/categories/unital_algebras.py", line 70, in from_base_ring return self.one()._lmul_(r) File "sage/misc/cachefunc.pyx", line 2310, in sage.misc.cachefunc.CachedMethodCallerNoArgs.__call__ (build/cythonized/sage/misc/cachefunc.c:12712) self.cache = f(self._instance) Why is this? Is this expected behaviour? (Also asked on: https://ask.sagemath.org/question/60903/possible-bug-specifying-category-messes-up-coercion/) Thanks, Akos -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/6c814813-e7aa-4e13-8902-e574d45032f4n%40googlegroups.com.