Push other_dict to the stack of dictionaries in the Context
(self, other_dict)
| 168 | return duplicate |
| 169 | |
| 170 | def update(self, other_dict): |
| 171 | "Push other_dict to the stack of dictionaries in the Context" |
| 172 | if not hasattr(other_dict, "__getitem__"): |
| 173 | raise TypeError("other_dict must be a mapping (dictionary-like) object.") |
| 174 | if isinstance(other_dict, BaseContext): |
| 175 | other_dict = other_dict.dicts[1:].pop() |
| 176 | return ContextDict(self, other_dict) |
| 177 | |
| 178 | |
| 179 | class RenderContext(BaseContext): |