Sorry, I mis-read your mail and thought you wanted to make __len__ returns a tuple. Don't take my previous answer into account, I agree that __len__ should returns number of rows, not the total number of elements. Regards, Stéphane