Antoon Pardon wrote: > Write somekind of property so that if you manipulate a.x it would > manipulate data[-1]
Like that? >>> def make_prp(index): ... def get(self): return self[index] ... def set(self, value): self[index] = value ... return property(get, set) ... >>> class List(list): ... first = make_prp(0) ... last = make_prp(-1) ... >>> items = List([1,2,3]) >>> items.first 1 >>> items.last = 42 >>> items [1, 2, 42] However, that's customizing attribute access, not name binding. Peter -- http://mail.python.org/mailman/listinfo/python-list