On Fri, Apr 24, 2009 at 8:42 PM, Robert Bradshaw
<rober...@math.washington.edu> wrote:
>
> On Apr 24, 2009, at 8:24 PM, Nick Alexander wrote:
>
>>
>>> Another option is
>>>
>>> sage: 3/2 + 1/2 in ZZ
>>> True
>>> sage: 3/2 + 1/3 in ZZ
>>> False
>>
>> I just ran into the "True in ZZ" returns True thing again.  How do I
>> check to see if I passed an option or "True"?
>
> You can do "x is True"

Also you could do

   isinstance(x, bool) and x

but I like Robert's solution better.

William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to