4 This has to be implemented before the release:
9 Imagine the following template::
15 Problem with that is that it compiles to this::
17 if environment.subscribe(l_foo, 'bar'):
20 l_baz(environment.subscribe(l_foo, 'bar')),
23 As `environment.subscribe` is more expensive then regular attribute lookups
24 (it tries getitem/getattr and in sandbox mode also permissions) multiple
25 lookups with the same parameters in the same scope should get local aliases.
26 The result we have is that one::
28 t1 = environment.subscribe(l_foo, 'bar')
35 However that should only happen if the attribute is accessed multiple times
36 unlike locals and filters/tests which are always pulled. We're not doing that
37 for filters/tests/locals as nested scopes may access it and testing is too
38 complicated for the tiny performance improvement but easy for attribute
39 lookups, keeping the complexity of the whole thing in mind.