(self)
| 77 | |
| 78 | # Pop from the list |
| 79 | def pop(self): |
| 80 | # Remove the item. Note that if the length of the chunks goes below a power |
| 81 | # of two, we do NOT remove the item (this is to prevent DoS attacks by |
| 82 | # repeatedly expanding and contracting a list around a power of 2, causing |
| 83 | # repeated O(n) resizes), instead we handle the size reduction in the root method |
| 84 | self[self.length-1] = b'\x00' * self.item_length |
| 85 | self.length -= 1 |
| 86 | |
| 87 | def __len__(self): |
| 88 | return self.length |
no outgoing calls
no test coverage detected