I do not like it since a matrix can also be thought as a list of vectors. Which is actually what you get when doing
{{{
sage: m = matrix(3, range(9))
sage: list(m)
[(0, 1, 2), (3, 4, 5), (6, 7, 8)]
}}}

Most of the time, `a in b` should be equivalent to

  any(x == b for x in a)

And for matrix `a in m` would be an answer to "is a a row of m?".

Vincent

On 15/04/15 19:26, Jori Mantysalo wrote:
Would it break something if matrix class would have __contains__() so
that one could say for example "42 in M" instead of "42 in M.list()"?


--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to