Re:A trick to have arbitrary infix operators in Python
by dataflow on Tuesday January 25, 2022 @11:47PM
(#30081842)
I mean sure, but the fact that you had to write 6 strings to illustrate this should tell you something, right?
This
user_name + ": " + attr1
is easier to eyeball than concat(user_name, ": ", attr1)
user_name + ": " + attr1 + "| " + attr2 + "\n"
is more difficult to parse by eyeball for me then
concat(user_name, ": ", attr1, "| ", attr2, "\n")