equal
deleted
inserted
replaced
60 return d[key] |
60 return d[key] |
61 return otherwise |
61 return otherwise |
62 |
62 |
63 def update(self, other_dict): |
63 def update(self, other_dict): |
64 "Like dict.update(). Pushes an entire dictionary's keys and values onto the context." |
64 "Like dict.update(). Pushes an entire dictionary's keys and values onto the context." |
|
65 if not hasattr(other_dict, '__getitem__'): |
|
66 raise TypeError('other_dict must be a mapping (dictionary-like) object.') |
65 self.dicts = [other_dict] + self.dicts |
67 self.dicts = [other_dict] + self.dicts |
66 return other_dict |
68 return other_dict |
67 |
69 |
68 # This is a function rather than module-level procedural code because we only |
70 # This is a function rather than module-level procedural code because we only |
69 # want it to execute if somebody uses RequestContext. |
71 # want it to execute if somebody uses RequestContext. |