This is way too late to change now. I agree that plus isn't great but & is also quite bad since it means bitwise and. A totally separate operator for concatenation would have been preferable but this is as I said way too late to change now.
> On 18 Nov 2019, at 15:02, [email protected] wrote: > > x = 5 > y = 5 > print (x+y) #prints 10 > This is easy because everyone knows that + sign adds 2 values together. > > print(str(x)+str(y)) #prints 55 > I understand that there are more then one way to do this but, the bottom line > is, this is not logical. > Tony+Maria > is what we used to write when we were little children fallen in love, but > once we grow up, we started to think (more or less) and write the following: > Tony & Maria > > This is pretty much what i suggest. Add new COMBINE operator sign & that will > combine what ever value there is into one printable line without need for > converting or formatting it. > > Examples: > x = ("I love") > y = ("this idea ") > z = ("posted on November ") > a = 18 > print (x & y & z & a) # prints I love this idea posted on November 18 > > As of right now, this could look like this: > x = ("I love") > y = ("this idea ") > z = ("posted on November ") > a = 18 > print (x + y + z + str(a)) > and thats not much difference to worry about. Problem comes when there are > more different data types need to be added and combined together. > This would make things allot easier for many people and make string handling > easier also. > _______________________________________________ > Python-ideas mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/EAL5G5HD6565KE34P5O7DOAZLJ4ADLAT/ > Code of Conduct: http://python.org/psf/codeofconduct/ _______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/PS6DWPVCGZI267SWVJ6CD65EF75KCSEU/ Code of Conduct: http://python.org/psf/codeofconduct/
