# HG changeset patch # User Paul Boddie # Date 1203897251 -3600 # Node ID 8d3b1d59f0bfc66a46107a58082a51468c8c33f9 # Parent 189b5913ac62377aec39357f65956fb0e8fd9f77 Re-use the earliest suggested attribute position, relocating attributes to within the reserved space if the suggested positions are too high. diff -r 189b5913ac62 -r 8d3b1d59f0bf micropython/inspect.py --- a/micropython/inspect.py Sun Feb 24 19:03:08 2008 +0100 +++ b/micropython/inspect.py Mon Feb 25 00:54:11 2008 +0100 @@ -474,7 +474,8 @@ for name, pos in position_items: pos = list(pos) - if pos and namearray[pos[0]] is None: + pos.sort() + if pos and pos[0] < len(namearray) and namearray[pos[0]] is None: namearray[pos[0]] = name else: if pos: