Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

One reason is that abstract base classes are relatively new (Python 2.6) and the work hasn't been done to put them in place. It will require a bit of thought about how best to use them within Sage. For example, I don't think we want isinstance(i, Integer) to be True since in Sage Integer is a concrete class wrapping an MPIR mpz_t. However, you could register Integer as numbers.Integral and then test against that.