Thanks for the further detailed responses on this. I understand it much better now! Roberto, may I suggest giving a little more detail on this aspect of table.sort() in the next edition of PiL? I believe newcomers would benefit from it. Regards Iain