I use this to define just functions in templates and then "import" them in the mentioned way.
Then I noticed that a second %include behaves differently.
The reason was that the second %include is bound to the env inside the include merged with the current env (using globals().update).
I use this to define just functions in templates and then "import" them in the mentioned way. Then I noticed that a second
%include
behaves differently. The reason was that the second%include
is bound to theenv
inside theinclude
merged with the currentenv
(usingglobals().update
).