2008-02-25 | Paul Boddie | raw files shortlog changelog graph | Re-use the earliest suggested attribute position, relocating attributes to within the reserved space if the suggested positions are too high. | |
micropython/inspect.py (file) |
1.1 --- a/micropython/inspect.py Sun Feb 24 19:03:08 2008 +0100 1.2 +++ b/micropython/inspect.py Mon Feb 25 00:54:11 2008 +0100 1.3 @@ -474,7 +474,8 @@ 1.4 1.5 for name, pos in position_items: 1.6 pos = list(pos) 1.7 - if pos and namearray[pos[0]] is None: 1.8 + pos.sort() 1.9 + if pos and pos[0] < len(namearray) and namearray[pos[0]] is None: 1.10 namearray[pos[0]] = name 1.11 else: 1.12 if pos: