On 14/04/15 12:38, Volker Braun wrote:
The behavior of len is just a CPython implementation detail. One that is
perfectly fine if you have actual containers but really crappy if you want
to do math. Its not like we would break len, it is still in line with the
Python docs.

If you want to do math, use `.cardinality()`. Some sets are infinite. Moreover there is a nice difference between `len(S)` and `S.cardinality()` that I like: the former returns a Python int while the second returns a Sage integer or Infinity (almost always, see #18159).

Vincent

--
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.

Reply via email to