On Wed, Apr 30, 2014 at 09:23:41AM +0200, Vincent Delecroix wrote: > FiniteEnumeratedSet is aimed to not modify the input it gets. So if > you feed it with Python objects which are not elements it will not > complain and you have to go with that.
Yup. We would want to properly support facade FiniteEnumeratedSets over plain Python objects and in particular have: sage: F = FiniteEnumeratedSet(["a","b","c"]) sage: F("a") "a" However the coercion system currently does not support facades over plain Python objects. That's essentially just because sage.structure.coerce_maps.DefaultConvertMap._call_ (which is what Parent.__call__ defaults to if there is no coercion) specifies that its return value should be an Element. That has been irritating me for a while, but I am not sure what's the right fix. Cheers, Nicolas -- Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net> http://Nicolas.Thiery.name/ -- 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 post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.