Show More
@@ -37,6 +37,7 indexformatng = b">Qiiiiii20s12x" | |||
|
37 | 37 | indexfirst = struct.calcsize(b'Q') |
|
38 | 38 | sizeint = struct.calcsize(b'i') |
|
39 | 39 | indexsize = struct.calcsize(indexformatng) |
|
40 | nullitem = (0, 0, 0, -1, -1, -1, -1, nullid) | |
|
40 | 41 | |
|
41 | 42 | |
|
42 | 43 | def gettype(q): |
@@ -103,7 +104,7 class BaseIndexObject(object): | |||
|
103 | 104 | |
|
104 | 105 | def __getitem__(self, i): |
|
105 | 106 | if i == -1: |
|
106 |
return |
|
|
107 | return nullitem | |
|
107 | 108 | self._check_index(i) |
|
108 | 109 | if i >= self._lgt: |
|
109 | 110 | return self._extra[i - self._lgt] |
General Comments 0
You need to be logged in to leave comments.
Login now