| 1 | initial version |
I don't know if you actually need symbolic expressions, otherwise tests are very straightforward:
sage: x=12
sage: x in ZZ, x in QQ, x in RR
(True, True, True)
Note that tests using pure Python isinstance give different output, no surprise:
sage: isinstance(x, Integer), isinstance(x, ZZ)
(True, False)
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.