I'm using python label expressions to label address points. They concatenate various address element fields using python's .join() function.
If I apply an attribute join to my address point feature class (in an enterprise geodatabase) my python label expressions are altered by the program and they no longer work.
Here is the python label expression before applying the join (works great like this):
' '.join(str(i) for i in ([ANUMBERPRE], [ANUMBER], [ANUMBERSUF]) if i)
Here is the same expression after applying the join, Pro has altered it (the syntax is bad / does not work):
' sde.SL.address.'.josde.SL.address.IN(str(i) sde.SL.address.for i sde.SL.address.IN ([ANUMBERPRE], [ANUMBER], [ANUMBERSUF]) sde.SL.address.if i)
In the above, you can see that it mishandled the original python expression. It did not handle the opening parenthesis correctly and it upper-cased all instances of python 'in' to (SQL?) 'IN', even in the word 'joIN'. Also, I don't know why the letters 'jo' were appended to 'sde', which is the database instance.
Finally, here is the same python expression after I have removed the table join and the program has tried (unsuccessfully) to revert it back to its original syntax:
' '.joIN(str(i) for i IN ([ANUMBERPRE], [ANUMBER], [ANUMBERSUF]) if i)
Notice the two instances of capitalized 'IN'. Python doesn't like these.
I'm thinking this should be logged as a bug that needs to get fixed?