(self, last=True)
| 61 | curr = curr[1] |
| 62 | |
| 63 | def popitem(self, last=True): |
| 64 | if not self: |
| 65 | raise KeyError('dictionary is empty') |
| 66 | # Modified from original to support Python 2.4, see |
| 67 | # http://code.google.com/p/simplejson/issues/detail?id=53 |
| 68 | if last: |
| 69 | key = reversed(self).next() |
| 70 | else: |
| 71 | key = iter(self).next() |
| 72 | value = self.pop(key) |
| 73 | return key, value |
| 74 | |
| 75 | def __reduce__(self): |
| 76 | items = [[k, self[k]] for k in self] |