On Thu, Feb 09, 2006 at 03:39:46PM -0800, Aahz wrote: > Can you provide a couple of examples where you think you'd want __index__ > functionality but the name would be inappropriate?
Not really, or I wouldn't have had only a _slight_ reservation :) There are many functioncalls and methodcalls that only take integers, though, and they all currently use int() on their argument. file.read, socket.recv, signal.signal, str.zfill/center/ljust -- basically anything that uses the 'i' PyArg_Parse* format specifier, which is quite a lot. For a great many of them it will not make sense to pass objects that don't have an appropriate __int__, but who knows howmany really *mean* to ask for __index__ instead. I mostly voice the reservation to lure out people with actual reservations ;) -- Thomas Wouters <[EMAIL PROTECTED]> Hi! I'm a .signature virus! copy me into your .signature file to help me spread! _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com