A few ArcGIS-specific comments to add to Dan's typically useful, yet pure Python discussion.
1) When you convert from SOMA to Raster Calculator 10x and arcpy map algebra you definitely need to use &, |, ~ instead of and, or, not. I have found the following help doc very useful:
Working with operators in Map Algebra—ArcGIS Help | ArcGIS Desktop
2) Dan has a great point that you need to be very careful with complex expressions.
For example, this works in Raster Calculator. It processes left to right (maybe not what you want):
"ras1" & "ras2" & "ras3" == 1
This expression fails with the truth value is ambiguous error:
"ras1" & "ras2" == 1 & "ras3" == 1
Adding parentheses works, and probably is more likely to do what you want.
Extra parentheses are never a bad idea.
"ras1" & ("ras2" == 1) & ("ras3" == 1)
This help article also has some really great advice in it, including pointers on how to include regular (ie non-Spatial Analyst) tools inside map algebra expressions I hadn't noticed before. Worth a read!
Building complex statements—ArcGIS Help | ArcGIS Desktop