Hi!

Working on fixing some memory leaks by using weak references (here:
#12215), together with making matrix spaces unique parents (at #12290)
my patches trigger a problem with the method
sage.combinat.sf.sf.SymmetricFunctions.register_isomorphism.

self.register_isomorphism(morphism) does
   morphism.codomain().register_coercion(morphism)

The problem is that the method
sage.structure.parent.Parent.register_coercion raises an error, if
there already is a coercion from self to morphism.codomain(). In fact,
to my understanding, register_coercion is supposed to only be used
during initialisation of an object.

Admittedly I don't understand (yet) how using weak references and
unique matrix spaces can trigger that error. Perhaps the error did not
occur before, because currently equal matrix spaces can have different
hashes (which is a bug tackled at #12290).

But anyway, I think register_coercion is not correctly used, and it
should be fixed.

So, let me ask: What exactly is
SymmetricFunctions.register_isomorphism supposed to do? Shall it wipe
an existing coercion and replace it with something new? Or shall it do
nothing, if there already is a coercion in use?

Cheers,
Simon

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.

Reply via email to