| 2 | |
| 3 | I'm also removing this pointless implementation of `cardinality()`: |
| 4 | {{{ |
| 5 | def cardinality(self): |
| 6 | from sage.rings.integer import Integer |
| 7 | two = Integer(2) |
| 8 | if self._type is bool: |
| 9 | return two |
| 10 | elif self._type is int: |
| 11 | import sys |
| 12 | return two * sys.maxsize + 2 |
| 13 | elif self._type is float: |
| 14 | return 2 * two**52 * (two**11 - 1) + 3 # all NaN's are the same from Python's point of view |
| 15 | else: |
| 16 | # probably |
| 17 | import sage.rings.infinity |
| 18 | return sage.rings.infinity.infinity |
| 19 | }}} |
| 20 | Somebody probably found this clever, but it's just silly... who cares how many different `int` instances there exist? Besides, it's wrong in Python 3. |