Override to support the "get_slice" for python3
(self, index)
| 69 | return SortedDictIterator(self, self.keys(), reverse=True) |
| 70 | |
| 71 | def __getitem__(self, index): |
| 72 | """Override to support the "get_slice" for python3 """ |
| 73 | if isinstance(index, slice): |
| 74 | r = SortedDict(ignore_case = self.ignore_case) |
| 75 | for k in self.keys()[index]: |
| 76 | r[k] = self[k] |
| 77 | else: |
| 78 | r = super(SortedDict, self).__getitem__(index) |
| 79 | return r |
| 80 | |
| 81 | |
| 82 | if __name__ == "__main__": |
nothing calls this directly
no test coverage detected