25 Mar
2019
25 Mar
'19
6:58 a.m.
On Mon, Mar 25, 2019 at 9:24 PM Jonathan Fine <jfine2358@gmail.com> wrote:
Instead of naming these operations, we could use '+' and '-', with semantics:
# Set the values of the variables. >>> a = 'hello ' >>> b = 'world' >>> c = 'hello world'
# Some values between the variables. >>> a + b == c True >>> a == c - b True >>> b = -a + c True
The semantics are rather underdefined here. What *exactly* does string subtraction do? Is a-b equivalent to a.replace(b, "") or something else? Also.... you imply that it's possible to negate a string and then add it, but... what does a negative string look like? *confused* ChrisA