On Sat, 25 Feb 2023 at 09:36, <avi.e.gr...@gmail.com> wrote:
> From what you say, concatenation between visibly adjacent strings is done 
> once when generating bytecode. Using a plus is supposed to be about the same 
> but may indeed result in either an error if you use anything other than a 
> string literal
>
> bad = "hello " str(12)
>
> or you must use something like a "+" to do the concatenation at each run 
> time. Or, weirder, do it manually as :
>

Abuttal is a syntactic feature. It's completely different from string
concatenation. The only similarity is that some forms of addition may
be constant-folded.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to