You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Playing around with a proper error representation for the RepeatDict, I got the impression that nested repeat variables using the same name could be improperly handled.
The following script demonstrates that this is really the case:
As you see, the inner (i) loop has corrupted the outer repeat item (which is clear as there is a single dict).
Due to macros, a template writer may not know which nested repeat names are used. It may therefore be difficult to avoid the problem.
zope.pagetemplate uses a MultiMapping (essentially a stack of dicts) to avoid this problem. When a scope is entered, a new empty dict is pushed; when a scope is exited, the dict is popped.
The text was updated successfully, but these errors were encountered:
Playing around with a proper error representation for the
RepeatDict
, I got the impression that nested repeat variables using the same name could be improperly handled.The following script demonstrates that this is really the case:
As you see, the inner (
i
) loop has corrupted the outer repeat item (which is clear as there is a single dict).Due to macros, a template writer may not know which nested repeat names are used. It may therefore be difficult to avoid the problem.
zope.pagetemplate
uses aMultiMapping
(essentially a stack ofdict
s) to avoid this problem. When a scope is entered, a new emptydict
is pushed; when a scope is exited, thedict
is popped.The text was updated successfully, but these errors were encountered: