On 24 July 2010 22:29, Burcin Erocal <bur...@erocal.org> wrote:
> Hi,
>
> At Sage Days 24, I learned that Python allows the user to do arithmetic
> with bools:
>
> In [1]: 5+True
> Out[1]: 6

I personally don't see anything wrong with that - True has long since
been defined as 1 in most languages, and False as 0.

I just checked Mathematica 7

In[1]:= 12==12

Out[1]= True

In[2]:= 1+%

Out[2]= 1 + True

In[3]:= 1+False

Out[3]= 1 + False

So it handles True and False differently from integers.

Dave

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

Reply via email to