On Tuesday, February 2, 2016, Richard Purdie &lt;<a href="mailto:richard.purdie@linuxfoundation.org">richard.purdie@linuxfoundation.org</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Right now, if you have some python code like:<br>
<br>
X = &quot;a&quot;<br>
<br>
def somefunction(d):<br>
    d.setVar(&quot;X&quot;, &quot;b&quot;)<br>
    d.setVar(&quot;Y&quot;, &quot;${X}&quot;)<br>
<br>
then any sane person would expect that Y = &quot;b&quot; at the end of the<br>
function. This is not the case, Y = &quot;a&quot;.<br>
<br>
This is due to the python function being expanded before execution, the<br>
executed code would read d.setVar(&quot;Y&quot;, &quot;a&quot;). This understandably<br>
confuses people, it also makes it near impossible to write ${} in a<br>
python function without unintended things happening.<br>
<br>
I think there is general agreement we should fix this and standardise<br>
on non-expansion of python functions. We already don&#39;t expand anonymous<br>
python (mostly).<br>
<br>
I&#39;ve checked OE-Core with buildhistory before and after this change and<br>
there were a small number of issues this exposed which I&#39;ve sent<br>
patches for.<br>
<br>
I propose we default to not expanding python code and then deal with<br>
any consequences from that if/as/where identified. This will improve<br>
new user understanding and usability of the system, it also allows<br>
several long standing weird expansion issues to be fixed.<br>
<br>
Signed-off-by: Richard Purdie &lt;<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;richard.purdie@linuxfoundation.org&#39;)">richard.purdie@linuxfoundation.org</a>&gt;<br></blockquote><div><br></div><div>I absolutely support this. It should reduce confusion with no loss of functionality.</div><div><br></div><div>Acked-by: Christopher Larson &lt;<a href="mailto:kergoth@gmail.com">kergoth@gmail.com</a>&gt;</div><br><br>-- <br><div dir="ltr">Christopher Larson<br>kergoth at gmail dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Maintainer - Tslib<br>Senior Software Engineer, Mentor Graphics</div><br>