On Mon, Mar 25, 2019 at 9:24 PM Jonathan Fine <jfine2...@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 _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/