Why does 2- - - -1=3?
2 - - - - 1 is the same as 2 - ( - ( - ( - 1))) what is the same as 
2 - ( - (1)) = 2 + 1 = 3
As soon as number of minuses is even you actually do "+".
I recently ran into a bug using python (v3.6.8) and pandas (v0.23.4) where I was trying to subtract a date offset. However, I accidentally typed two -- signs and it ended up adding the date offset instead. I did some more experimenting and found that 2--1 will return 3. This makes sense since you could interpret that as 2-(-1), but you can go even farther and string a bunch of negatives together 2----1 will return 3. I also replicated this in R and it does the same thing. Can anyone help me understand what's happening here?