On Aug 1, 5:16 am, "Aaron S. Meurer" <asmeu...@gmail.com> wrote: > On Jul 31, 2009, at 8:42 PM, Marco wrote: > This should be easy. We have a Rational class that is what every > rational number is an instance of. For example, 5/6 as a rational > number in SymPy would be represented as Rational(5, 6). It would be > easy to create a RationalSet class that checks to see if something is > an instance of Rational or if it has Rational assumptions on it in > RationalSet.__contains__(). So for example, > >>> Rational(5, 6) in RationalSet > and > >>> a = Symbol('a', rational=True) > >>> a in RationalSet > > would both return True. This should work very nicely with our new > assumptions system that we are getting.
We could have Assume(x in QQ) instead of Assume(x, rational=True). This would be a much nicer syntax imho. Vinzent --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sympy?hl=en -~----------~----~----~----~------~----~------~--~---