On Tue, Nov 19, 2019 at 6:31 AM <[email protected]> wrote: > > OMG people, no one said its a replacement for + > Its an addition. that does nothing but combining data.
Except that you're asking it to do something extremely similar to what the + operator already does. > It does not perform any mathematical operations whats so ever. It simply puts > things together regardless of their data type. > (1.1 & 5 & "word") results in 1.15word > That fact that you say "will be far more misleading" is because its > fundamentally misleading and needs to be fixed. By "puts things together", you actually mean "converts to string and then concatenates". What will your hypothetical operator do with these? q = bytes(range(240, 256)) w = fractions.Fraction(22, 7) e = [1, 2, 34, 5, 6] r = socket.SOCK_STREAM t = lambda: 123 print(q & w & e & r & t) If this is simply going to format each one as a string and print them, then why not, as has been suggested, simply print each item? print(q, w, e, r, t) Or, if you need to put the result into a string rather than immediately print it, why not call str() or format() on each value and then join them? > Look at autoit code, even monkeys understand that & combines and + does math. Well, fortunately for us, we're a lot smarter than monkeys, so we can understand that + does integer math, float math, decimal math, list concatenation, string concatenation, bytes concatenation, and a host of other things. ChrisA _______________________________________________ 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/GDRPQAIGNQBRD7A6TK7JNWUM6QPZICNA/ Code of Conduct: http://python.org/psf/codeofconduct/
