> sage: W([1,2]) in ZZ
> ---------------------------------------------------------------------------
> NotImplementedError                       Traceback (most recent call last)
> <ipython-input-30-ef733470b649> in <module>()
> ----> 1 W([Integer(1),Integer(2)]) in ZZ
> [...]
>
> NotImplementedError: please implement _an_element_ for Words over {1, 2,
> 3, 4}
>
> It is easy to fix by adding the _an_element_ method to W by doing:
>
> sage: W._an_element_ = lambda : W()
> sage: W([1,2]) in ZZ
> False
>

_an_element_ should return an element of W, rather than None.  Other than
that, I'm not sure whether W is deficient coercion-wise in any other way;
should there be coercions from anywhere?
David

-- 
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/groups/opt_out.

Reply via email to