Peter Otten wrote:
Greg Ewing wrote:

This seems to happen even with a custom subclass of tuple, so it must be doing an exact type check.

No, it doesn't do an exact type check, but always calls the tuple method:

I guess you mean len(). On further investigation, this seems to be right, except that it doesn't invoke a __len__ defined in a custom subclass. So there's something in there hard-coded to expect a built-in tuple.

In any case, the original idea isn't possible.

--
Greg Ewing, Computer Science Dept,
University of Canterbury,       
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to